IE support for attribute selectors with HTML5 doctype

前端 未结 2 912
庸人自扰
庸人自扰 2021-01-24 08:58

w3school\'s chapter on attribute selectors states that:

IE7 and IE8 support attribute selectors only if a !DOCTYPE is specified.

IE7

2条回答
  •  不要未来只要你来
    2021-01-24 09:05

    Note they aren't stating the HTML5 doctype but state it requires a doctype, though poorly worded. All new web pages are required to have a doctype so the point is moot. Use the HTML5 doctype because it puts all browsers into standards mode where you want to be.

    As far as CSS goes, it's more important to know which properties the browser supports in the first place.

提交回复
热议问题