20 css css-selectors
在IUI css文件中,它们使用以下选择器:
body > *:not(.toolbar)
body > *[selected="true"]
Run Code Online (Sandbox Code Playgroud)
>,*:not()和*[]是什么意思?
谢谢.
Dam*_*isa 17
>
指直接的孩子*
是一个通用的选择器(一切):not()
除了括号中的内容之外的任何东西*[]
意味着与括号中的内容相匹配的任何内容在你的情况下:
body > *:not(.toolbar) // means any element immediately under the body tag that isn't of class .toolbar
body > *[selected="true"] // means any element immediately under the body tag where the selected attribute is "true"
Run Code Online (Sandbox Code Playgroud)
>
并*
在CSS 2.1规范中定义.的:not
伪类和[]
选择器在所述CSS 3规范定义.
有关详细信息,请参阅:http://www.w3.org/TR/CSS21/selector.html和http://www.w3.org/TR/css3-selectors /.
归档时间: |
|
查看次数: |
14840 次 |
最近记录: |