css 重置
作者:chrispy
PC端
body,ol,ul,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fieldset,legend,input,textarea,select{margin:0;padding:0;box-sizing:border-box}
html,body{width: 100%;height: 100%;}
body{font:10px"宋体","Arial Narrow",HELVETICA;background:#fff;color:#303030}
a{color:#303030;text-decoration:none}
a:hover{color:#303030;text-decoration:none}
a:active{text-decoration:none}
em{font-style:normal}
li{list-style:none}
img{border:0;vertical-align:middle}
table{border-collapse:collapse;border-spacing:0}
p{word-wrap:break-word}
em,i{font-style: inherit;}
移动端
/* CSS reset */
html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4,
h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td { margin: 0; padding: 0; }
*,
*:after,
*:before {
-webkit-box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
button{
outline: none;
}
html,body {
width: 100%;
height: 100%;
overflow: hidden;
background: #F5F5F5;
}
body{
font-size: 14px;
-webkit-text-size-adjust: 100% !important;
text-size-adjust: 100% !important;
-moz-text-size-adjust: 100% !important;
}
table { border-collapse: collapse; border-spacing: 0; }
fieldset, img { border: 0; }
address, caption, cite, code, dfn, th, var {
font-style: normal;
font-weight: normal;
}
ol, ul {
list-style: none;
}
caption, th {
text-align: left;
}
h1, h2, h3, h4, h5, h6 {
font-size: 100%;
font-weight: normal;
}
abbr, acronym {
border: 0;
}
a {
text-decoration: none;
}
/* 解决兼容而加的样式 */
a, img {
-webkit-touch-callout: none;
/*禁止长按链接与图片弹出菜单*/
}
html, body {
-webkit-user-select: none;
/*禁止选中文本*/
user-select: none;
-webkit-overflow-scrolling: touch; /* 弹性滑动 */
}
a, img {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0)
}
button, input, optgroup, select, textarea {
/*!*-webkit-appearance:none;*/ /*去掉webkit默认的表单样式*/
}
a, button, input, optgroup, select, textarea {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
/*去掉a、input和button点击时的蓝色外边框和灰色半透明背景*/
}
-webkit-overflow-scrolling: touch; 弹性滑动