关于css的重置代码有很多,也有不少人写过适合不同站点的重置代码
@charset "utf-8"; /* CSS Document */
html{ font-size:62.5%; /* 10÷16=62.5% */ }
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, rem, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video, pre, form, fieldset, input, textarea, blockquote, p { margin:0; padding:0; border:0; }
img{ border:0;} /* 图片边框为0 */
ul, ol, li {
list-style:none; /* 定义列表不使用项目符号*/
}
a {
text-decoration:none; /* 去掉下划线*/
}
a:hover {
text-decoration:underline; /* 有下划线*/
}
body, tr, td, p, fieldset, div, span, select, input, a { font-size:1.4rem; font-family:"\5FAE\8F6F\96C5\9ED1", "microsoft yahei", tahoma; }
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
} /* 定义预格式化保留空格样式的文本*/
input, label, img, th {
vertical-align:middle;
} /* 定义表单、标注、图片、表格标题垂直居中*/
h1 { font-size:2.4rem; }
h2 { font-size:2.0rem; }
h3 { font-size:1.8rem; }
h4 { font-size:16rem; }
h5 { font-size:1.4rem; }
h6 { font-size:1.2rem; }
.fb {
font-weight:bold /* 文字加粗*/
}
|