任何人都可以使用一些HTML(5)reset.css
例如:http://html5doctor.com/html-5-reset-stylesheet/HTML5重置CSS技巧 - 使用和不使用通用选择
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
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 {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
...
而是我做的事:
* {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
优点:
- 看起来更简单
- 权重更少
任何人都可以告诉我,如果我的解决方案有任何问题(任何浏览器的东西,我不知道)?
或者在这种情况下列出几乎所有标签名称的优点是什么?
'*'是一个非常昂贵的选择器。 – Terry 2014-09-26 22:20:31
多少非常? – 2014-09-26 22:23:01
供参考:http://csswizardry.com/2011/09/writing-efficient-css-selectors/ – Terry 2014-09-26 22:30:45