例如,如果我使用eric meyer重置,我必须将此样式应用于正文.
body { font: 100%/1.5 "Helvetica Neue", Helvetica, Tahoma, Arial, sans-serif;*/ }
Run Code Online (Sandbox Code Playgroud)
我应该在重置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, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
Run Code Online (Sandbox Code Playgroud)
如果不重置设置你提到中的任何字体属性font的规则,这不要紧,你是否把它复位之前或之后,因为它不会被重置改变.
编辑 现在,我看到您正在使用的重置:
对于inherit值,无论您在font重置之前还是之后使用规则.So font-family("Helvetica Neue", Helvetica, Tahoma, Arial, sans-serif)对于两种变体都是相同的.这同样适用于使用相同值(font-size)的属性.
但line-height两个body规则集中的值都不同(重置:1;您的规则:) 1.5.在那里你必须决定你想拥有什么价值:如果是1,请在重置前设置你的规则; 如果是1.5(我猜是这样),请在重置后放置规则.