开发者

How to refer in CSS to all elements that have some attribute?

I know that [开发者_JAVA百科my_attr='my_value'] refers to all elements which have attribute my_attr with value my_value.

Is that possible to refer to all elements which have my_attr attribute (no matter what the value is) ?


Use [my_attr] alone:

[att] Represents an element with the att attribute, whatever the value of the attribute.


element[attr]

That should do it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜