移动端页面初始化 css和html的head中的设置

*, ::before, ::after{
    margin: 0;
    padding: 0;
    list-style: none;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;

    /*去除移动端点击产生的高亮状态*/
    -webkit-tap-highlight-color: transparent;
}

html{
    font-size: 10px;
    font-family: 'Microsoft Yahei', sans-serif;
    color: #000;
}

a{
    text-decoration: none;
    color: #666666;
}

ul,ol{
    list-style: none;
}

input{
    border: none;
    outline: none;
    /*针对iOS浏览器, 清除默认非扁平化分格*/
    -webkit-appearance: none;
}

.clearfix::before,
.clearfix::after{
    content: '';
    height: 0;
    line-height: 0;
    display: block;
    visibility: hidden;
    clear: both;
}

/*精灵图片的使用*/
[class^='icon-'],
[class*=' icon-']{
    background: url("../images/sprites.png") no-repeat;
    -webkit-background-size: 20rem 20rem;
    background-size: 20rem 20rem;
}

 






你可能感兴趣的:(web前端学习)