移动web开发清除默认样式设置

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_30152271/article/details/51799203
/*reset css*/
*,::before,::after{
    margin:0;
    padding:0;
    /*清除移动端默认的点击高亮效果*/
    -webkit-tap-highlight-color:transparent;
    /*设置以边框开始计算宽度*/
    -webkit-box-sizing:border-box;
    box-sizing:border-box;
}

body{
    font-size:14px;
    font-family:"Microsoft YaHei",sans-serif;/*设备默认字体*/
    color:#333;
}

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

a:hover{
    text-decoration:none;
}

ul,ol{
    list-style:none;
}

input{
    border:none;
    outline:none;
    /*清除移动端默认的表单样式*/
    -webkit-appearance:none;
}

/*common css*/
.f_left{
    float:left;
}

.f_right{
    float:right;
}

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

猜你喜欢

转载自blog.csdn.net/qq_30152271/article/details/51799203