
本文共 1163 字,大约阅读时间需要 3 分钟。
清除默认样式并添加公共样式
/清除默认样式/html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img,input{ margin:0; padding:0; }fieldset, img,input,button { border:0 none; padding:0;margin:0;outline-style:none; } /去掉input等聚焦时的蓝色边框/ul,li,ol{ list-style:none; }select, input { vertical-align:middle; }/select, input, textarea { font-size:12px; margin:0; }/textarea { resize:none; } /防止拖动/img { border:0; display:block; } /* 去掉图片低测默认的3像素空白缝隙,或者用display:block也可以*/ table { border-collapse:collapse; }a { text-decoration:none; }
/添加公共样式/
body { font:12px Arial,Verdana,"\5b8b\4f53"; color:#666; background:#fff; }
/清除浮动/.clearfix::after { content: ""; display: block; height: 0; overflow: hidden; visibility: hidden; clear: both; zoom: 1; }
h1,h2,h3,h4,h5,h6 { font-weight:normal;font-size:1em; } /设置h标签的大小,设置跟父亲一样大的字体font-size:100%;/s,i,em { font-style:normal;text-decoration:none; }
/公共类/.fl { float:left; }.fr { float:right; }.ac { text-align:center; }.hide { display:none; }.f12{ font-size: 12px; }.f14{ font-size: 14px; }.f16{ font-size: 16px; }
/* 解决a标签在移动端的下划线问题 */a:link, a:visited, a:hover, a:active, a:focus { text-decoration: none!important; }
发表评论
最新留言
关于作者
