以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;