What does an asterisk before an equal sign mean (*=) ? What about the exclamation mark?

后端 未结 5 2011
伪装坚强ぢ
伪装坚强ぢ 2020-12-16 06:11

I found these notations in a css :

.nav li ul li a [class*=\"icol-\"] { opacity: 0.5; filter: alpha(opacity=50); padding-top: 4px; }

.secNav .chzn-container         


        
5条回答
  •  渐次进展
    2020-12-16 06:47

    From the W3 recommendation:

    [att*=val]

    Represents an element with the att attribute whose value contains at least one instance of the substring "val". If "val" is the empty string then the selector does not represent anything.

    So, in your case, it will match any element that has icol- in their class attribute (child of .nav li ul li a).

提交回复
热议问题