CSS reset for HTML5

前端 未结 5 966
猫巷女王i
猫巷女王i 2020-12-31 05:02

Best practices?

How does this differ from HTML4 or XHTML1?

There\'s a lot of discussion going on over here: http://html5doctor.com/html-5-reset-stylesheet/

5条回答
  •  無奈伤痛
    2020-12-31 05:35

    I just use my variation of Eric Meyer's reset, with my own preferences. For HTML5 compatibility, I add the new elements in as needed.

    One thing in particular is that new elements are unstyled by default, so you need to provide your own defaults. This is especially important for block elements like section, aside, and article. You need to ensure you specify display:block for those elements.

提交回复
热议问题