What's the difference between html[lang=“en”] and html:lang(en) in CSS?

前端 未结 4 833
借酒劲吻你
借酒劲吻你 2020-11-29 07:21

The CSS language pseudo-class to allow us specify different styles for different languages, like so:

html:lang(en) .foo { ... }

However, th

4条回答
  •  清酒与你
    2020-11-29 07:52

    Css supports attribtue selectors for all elements, not just for the html tags lang attribute. For example html like bar could be selected like a[title=Jeeha] { ... } in css.

    See this link for more details on partial matches and variants.

提交回复
热议问题