前言

若文章有误,欢迎读者留言反馈

重置样式表

PC端

1
2
3
4
5
6
7
8
9
10
11
*{box-sizing: border-box;}
body,h1,h2,h3,h4,h5,h6,p,ul,li,ol,dl,dd,fieldset,legend,button,input,textarea,th,td{padding:0;margin:0;}
html{font-family:"微软雅黑";font-size:12px;background-color:#eeeeee;}
.clear:after{content:"";display:block;clear:both;height:0;visibility:hidden;overflow:hidden;}
.clear{zoom:1;}
li{list-style:none;}
a{text-decoration:none;}
img{vertical-align:top;border:0;}
input,select,button,textarea{outline:none;}
textarea{resize:none;}
input[type="button"],input[type="submit"],input[type="file"] {cursor:pointer;}

移动端

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
*{
/*页面点击链接时,会出现高亮框,用此代码解决*/
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
/*在谷歌里面小于12号的字,都会显示12号字,此代码解决此问题*/
-webkit-text-size-adjust: none;
/*禁用手机浏览器的用户选择复制文本的功能*/
-webkit-user-select: none;
-webkit-box-sizing:border-box;
box-sizing:border-box;}
body,html,div,h1,h2,h3,h4,h5,h6,ul,ol,dl,dt,dd,li,p{margin:0;padding:0;}
a{text-decoration: none;color: #666;}
.clear:after{content:"";display:block;clear:both;overflow:hidden;height:0;visibility:hidden;}
.clear{zoom: 1;}
input:focus{outline:none;}
input::-webkit-input-placeholder { color:red;}
ul,ol{list-style: none;}
img{vertical-align: top;border: 0;}