我正在寻找适用于两年或更短时间的浏览器(例如IE9及更高版本)的CSS重置文件



我正在使用以下内容进行重置以补偿浏览器差异:

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, em, 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, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

我使用的文件我认为很旧。有没有人有更新的东西,更适合不到几年的浏览器,例如IE9及更高版本?我问这个问题的主要原因之一是,当我尝试使用浏览器开发人员工具时,我厌倦了在检查 CSS 时看到重置文件中的许多条目。

大多数当前的(响应式)CSS框架都使用normalize.css如Twitter Bootstrap和Zurb Foundation。

http://necolas.github.io/normalize.css/

请看这里为什么你应该使用规范化.css解决方案而不是重置.css
规范化.css和重置 CSS 有什么区别?

你正在使用Meyer的重置我认为这是重置CSS属性的最佳方式。如果你想使用这种或任何其他重置技术,无论如何,你必须处理这些条目。

相关内容

最新更新