1.設(shè)置網(wǎng)頁跟字體大小
(function(){
var html=document.documentElement;
var hWidth=html.getBoundingClientRect().width;
html.style.fontSize=hWidth/數(shù)字+'px';
}())
2.重置移動端相關(guān)默認(rèn)樣式
a,
input,
button {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
h1 {
margin: 0;
padding: 0;
}
a {
text-decoration: none;
}
input,
button {
-webkit-apperance: none;
border-radius: 0;
}
body {
margin: 0;
-webkit-user-select: none;
-webkit-text-size-adjust: 100%;
}
body * {
-webkit-user-select: none;
font-family: Helvetica;
}
ul {
margin: 0;
padding: 0;
list-style: none;
}
img {
vertical-align: top;
}
body,
html {
height: 100%;
width: 100%;
}
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者