CSS attribute selector + descendant gives a bug in Webkit?

后端 未结 4 2005
栀梦
栀梦 2021-01-11 19:25

Consider this CSS:

[data-color=\"red\"] h1 {
background-color:red;
}

[data-color=\"blue\"] h1 {
background-color:blue;
}

And this HTML:

4条回答
  •  旧时难觅i
    2021-01-11 19:43

    When using Chrome (Webkit) I get this issue as well, though it seems to work fine in Firefox and IE9. It definitely appears to be a problem with Webkit that the extra whitespaces cause problems.

提交回复
热议问题