问题
Possible Duplicate:
(why) is the CSS star selector considered harmful?
I noticed that many CSS developers reset the margin, font and padding of a big number of HTML elements by explicitly declaring them all in the beginning (e.g.Yahoo and meyerweb versions). So I ask myself, why not simple reset globally using the *? I know that this break the layout for some elements like buttons and blockquotes but those can easily be restyled, which is a must if you really want to reset the layout because buttons have different looks in all browsers.
回答1:
I think you just answered yourself - it's not simple restyling buttons and form controls because all user agents have very specific styling catering toward them.
回答2:
I think the idea of targeting specific controls was to improve performance. Apparently the "*" selector is very expensive. Otherwise, I don't believe using something like the below would have much impact other than performance ( Which is debatable I suppose )
* { margin:0; padding:0; }
来源:https://stackoverflow.com/questions/5071203/why-not-reset-css-using-the-asterisk