移动端CSS RESET

以iphone6的750的视觉稿为准


/*css reset*/
html{font-size: 85.3333px;}
body{font-size: 0.14rem; }/*实际相当于14px*/

/* iphone 6 */
@media (min-device-width : 375px) and (max-device-width : 667px) and (-webkit-min-device-pixel-ratio : 2){
    /*html{font-size: 117.1875px;}*/
html{font-size: 100px}

}
/* iphone6 plus */
@media (min-device-width : 414px) and (max-device-width : 736px) and (-webkit-min-device-pixel-ratio : 3){
    /*html{font-size: 129.375px;}*/
    html{font-size: 110.4px;}
}
/* CSS reset */
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, p {
    margin: 0;
    padding: 0;
}
h1, h2, h3, h4, h5, h6 {
    font-size: 100%;
    font-weight: normal;
}
li {
    list-style: none;
}
img {
    border: none;
    vertical-align: top;
}
a:-webkit-any-link {
    color: inherit;
    text-decoration:none;
    cursor: auto;
}
input, input:focus, input:active, input:hover,button{border:none; outline:none; background-color:transparent;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}
/* 公共样式 */
html{
    position: relative;
    min-height: 100%;
}
body {
    font-family: PingFangSC-Regular, Helvetica, 'Microsoft Yahei', tahoma, sans-serif;
    width: 100%;
    height: 100%;
    text-align: left;
    //background: #ebecf1;
    -webkit-tap-highlight-color:rgba(0,0,0,0);
    -moz-user-select:none;
    -webkit-user-select:none;
}
.clearfix:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
    font-size: 0;
}
*{
    box-sizing: border-box;
}

750视觉稿为例,显示高度200px;则height:1rem;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值