CSS reset that sets everything to default values

前端 未结 6 1753
忘了有多久
忘了有多久 2020-12-03 23:08

I\'m working on a browser extension that adds it\'s UI to the pages DOM. On some pages I have the problem certain styles affect my UI. To counter this I keep my UI underneat

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-03 23:50

    Yes, absolutely.

    There are two schools of thought to this. One is the zeroing style reset sheets, which basically remove all margin, padding and other such settings from the css. A good example of this is Eric Meyer's Reset CSS

    The other approach is to set everything to roughly what you'd sensibly expect it to be, setting a reasonably looking margin to paragraphs and headings, indenting lists etc. A good example of this is Normalize.css

    Some browsers also support the initial value, which sets the value of a property back to what it intially was. It's not widely supported enough to use in production, IMO.

提交回复
热议问题