版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/p930318/article/details/80519588
页面头部添加禁止用户手动调整缩放和比例 。 name="viewport"
<
meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no"
>
公用:
html,body{
height:
100%;}
html{
font-size:
5.25vw;}
body{
-webkit-text-size-adjust:
none;text-size-adjust:
none;
overflow-x:
hidden;
max-width:
480px;
margin-left:
auto;
margin-right:
auto;
user-select:
none;
-webkit-user-select:
none;
position:
relative;
background:
#f3f4f5;}
html,
body,
ul,
li,
i,
em,
a {
margin:
0;
padding:
0;
list-style:
none;
text-decoration:
none;
}
a {
transition:
all
0.3s
ease;
text-decoration:
none;
color:
inherit;
outline:
0;
}
input{
outline:
none;
-webkit-tap-highlight-color:
rgba(
0,
0,
0,
0);
}
ul {
padding-left:
0;
list-style-type:
none;
}