Use of * selector in style sheet to reset styles

后端 未结 3 889
隐瞒了意图╮
隐瞒了意图╮ 2021-01-14 09:29

At the moment I am just resetting the styles I need at the top of my style-sheet, like:

html, body, div, fieldset, form, h1, h2, h3, h4, p, ul, li {
    marg         


        
3条回答
  •  -上瘾入骨i
    2021-01-14 10:08

    I once ran some benchmarking and the *{} reset did not run any slower than the resets - Meyers, YUI and no reset at all.

    The main problem with the *{} reset is that it resets the padding on the input buttons for most browsers but IE keeps some of its padding making it very hard to consistently style the buttons cross-browser.

提交回复
热议问题