什么>在CSS中的意思? [英] What does > in CSS mean?

查看:128
本文介绍了什么>在CSS中的意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IUI css文件中,它们使用以下选择器:

  body& *:not(.toolbar)
body> *,*:not()和* [*]是什么意思?

]表示?



感谢。

解决方案

> 表示是。所以 body> *:not(.toolbar)匹配 *:not(.toolbar) body



*:not(.toolbar)匹配任何没有类 .toolbar



* [selected =true] 匹配所选属性等于 true 的任何元素。



请记住,最后两个( *:not() * [] CSS3规范,您通常不能依靠它们进行跨浏览器CSS兼容性。但是,它们是完全支持在WebKit这是什么iPhone(因此iUI)使用。


In the IUI css file, they use the following selectors:

body > *:not(.toolbar)
body > *[selected="true"] 

What does the >, *:not() and *[] mean?

Thanks.

解决方案

> means "is a child element of". So body > *:not(.toolbar) matches *:not(.toolbar) that is a child of body.

*:not(.toolbar) matches any element that does not have the class .toolbar.

*[selected="true"] matches any element with the selected attribute equal to true.

Keep in mind that the last two (*:not() and *[] are part of the CSS3 spec and you usually can't rely on them for cross-browser CSS compatibility. They are, however, fully supported in WebKit which is what the iPhone (and consequently iUI) use.

这篇关于什么>在CSS中的意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆