重设样式的目标是减少浏览器间的不一致,如缺省的行高,边距和标题的字体大小,等等。
下面这个示例是非常通用的。例如,它并没有任何缺省颜色或前景等设置。因此并不推荐原封不动地将其搬到您的项目中。您应对其加以编辑、扩展,使其适应您的重设底线,如给页面、链接等添加您喜欢的颜色、字体,等等。
您可以对其进行任何修改使其适合您的需要,并可以在这里下载。
html, body, form, div, iframe, applet, object,
dl, dt, dd, ol, ul, li, h1, h2, h3, h4, h5, h6,
table, caption, tbody, tfoot, thead, tr, th, td,
p, fieldset, blockquote, pre,
span, a, abbr, acronym, address, big, cite, code,
del, dfn, font, img, ins, kbd, q, s, samp,
small, strike, strong, em, b, sub, sup, tt, var,
u, i, center, label, legend {
margin: 0;
padding: 0;
outline: 0;
border: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
content: '';
content: none;
}
/* 请定义 focus 样式! */
:focus {
outline: 0;
}
/* 记得添加插入的加亮样式! */
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
/* HTML 标记中仍然需要 'cellspacing="0"' */
table {
border-collapse: collapse;
border-spacing: 0;
}