Use of * selector in style sheet to reset styles

后端 未结 3 890
隐瞒了意图╮
隐瞒了意图╮ 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条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-14 10:12

    Via Google's Speed Recommendations, the wildcard selector is very inefficient. Plus, in the future you might have boxes that you don't want to be reset. By naming each one individually, you get both efficiency and control.

提交回复
热议问题