在我的朋友博客的第1页上,有一个动态创建的怪异(4我)CSS类。名字总是像[zsgqlex]
在我的计算机上,它发生在Chrome上(可在Firefox上运行),在另一台计算机上,它发生在Firefox上并在Chrome上运行:/
知道发生了什么吗?
答案 0 :(得分:3)
这是一个属性选择器。因此,它将选择具有[zsgqlex]属性的所有元素。您还可以为此选择器使用特定的值,如下面的示例所示。
div {
background-color: yellow;
}
[zsgqlex] {
background-color: pink;
}
[zsgqlex="value"] {
background-color: lightblue;
}
<div>no attribute</div>
<div zsgqlex>attribute without specified value</div>
<div zsgqlex="value">attribute with value</div>
<div zsgqlex="another value">attribute with another value not in the css</div>