时间:2021-05-08
.css3selectors th, .explain {background-color:#FFFF66; padding:4px; }.css3selectors td {padding:4px;}.css3selectors td.compliant {background-color:#009900;}.css3selectors td.iffy {background-color:#FF9900;}.css3selectors td.noncompliant {background-color:#FF0000;}
Update 6/30/09: Firefox 3.5 was released today. Like Safari 3.1 and newer (including Safari 4 beta), Opera 9.64 and newer and Google Chrome all support ALL CSS2.1 and CSS3 selectors. Here is a breakdown of all the browsers I’ve tested:
E:hover
E:focus
Dynamic pseudo-classesMatches E during certain user actions.
ΔΔ√√√√√√ΔΔ√√√√√√ΧΧ√√√√√√E:beforeE:after
Static pseudo-classes9.0
Saf3.0
IE8IE7 in IE8
Saf 4 betaSaf 3.2FF 3*√√√√√√√√√√√√√√√√√√√√√E√√√√√√√√√√√√√√√√√√√√√.class√√√√√√√√√√√√Δ√√√√√√√√#id√√√√√√√√√√√√√√√√√√√√√E F√√√√√√√√√√√√√√√√√√√√√E > F√√√√√√√√√√√√Χ√√√√√√√√E + F√√√√√√√√√√√√Χ√√√√√√√√E[attr]√√√√√√√√√ΔΔΔΧ√√√√√√√ΔE[attr=val]√Δ√√√ΔΔΔΔ√√√Χ√√√Δ√√ΔΔE[attr~=val]√Δ√√√ΔΔ√Δ√ΔΔΧ√√√Δ√√ΔΔE[attr|=val]√Δ√√√ΔΔ√Δ√ΔΔΧ√√√Δ√√ΔΔ:first-child√Δ√√√ΔΔΔΔ√ΔΔΧ√√√Δ√√Δ√:link√√√√√√√Χ√√√√√√√√√√√√√:visited√√√√√√√Χ√√√√√√√√√√√√√:lang()√√√√√√√Δ√√ΧΧΧ√√√Χ√√√√:before√√√√√√√√√√ΧΧΧ√√√√√√√Χ::before√√√√√√√√√ΧΧΧΧ√√√√√√√Χ:after√√√√√√√√√√ΧΧΧ√√√√√√√Χ::after√√√√√√√√√ΧΧΧΧ√√√√√√√Χ:first-letter√√√√√√√√√√√√√√√√√√√√Χ::first-letter√√√√√√√√√ΧΧΧ√√√√√√√√Χ:first-line√√√√√√√√√√√√√√√√√√√√Χ::first-line√√√√√√√√√ΧΧΧ√√√√√√√√ΧThe following selectors are new to CSS3 (above were in previous versions)E[attr^=val]√Δ√√√ΔΔΧΔ√ΧΧΧ√√√Δ√√ΔΔE[attr$=val]√Δ√√√ΔΔΧΔ√ΧΧΧ√√√Δ√√ΔΔE[attr*=val]√Δ√√√ΔΔ√Δ√ΧΧΧ√√√Δ√√ΔΔE ~ F√√√√√√√√√√√√Χ√√√Χ√√√Χ:root√√√√√√√Χ√ΧΧΧΧ√√√√√√√√:last-child√Χ√√√ΔΔΧΧΧΧΧΧ√√√Χ√√ΔΔ:only-child√Χ√√√ΔΔΧΧΧΧΧΧ√√√Χ√√ΔΧ:nth-child()√Χ√√ΧΧΧΧΧΧΧΧΧ√√√Χ√ΧΧΧ:nth-last-child()√Χ√√ΧΧΧΧΧΧΧΧΧ√√√Χ√ΧΧΧ:first-of-type√Δ√√ΧΧΧΧΔΧΧΧΧ√√√Χ√ΧΧΧ:last-of-type√Χ√√ΧΧΧΧΧΧΧΧΧ√√√Χ√ΧΧΧ:only-of-type√Χ√√ΧΧΧΧΧΧΧΧΧ√√√Χ√ΧΧΧ:nth-of-type()√Χ√√ΧΧΧΧΧΧΧΧΧ√√√Χ√ΧΧΧ:nth-last-of-type()√Χ√√ΧΧΧΧΧΧΧΧΧ√√√Χ√ΧΧΧ:empty√Χ√√√ΔΔΧΧΧΧΧΧ√√√Χ√√ΔΔ:not()√√√√√√√Χ√ΧΧΧΧ√√√√√√√√:target√√√√√√√Χ√ΧΧΧΧ√√√√√√√√:enabled√√√√√√√√√ΧΧΧΧ√√√Χ√√√Χ:disabled√√√√√√√√√ΧΧΧΧ√√√Χ√√√Χ:checked√√√√√√√√√ΧΧΧΧ√√√Χ√√√√IE8 Supports the CSS2.1 selectors, including pseudoclasses but not pseudo elements. (See Double Colon Notation). IE8 has support for has support for Accessible Rich Internet Applications (ARIA)
To force IE8 to render your page in IE8 compliance mode, include the following meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=8" />The CSS selector support of IE7 within IE8 (when IE8 displayes a page in IE7 compatibility mode) is identical to IE7 as a standalone. However, the CSS properties do render differently. I will have to blog about that in a seperate entry when I get around to garnering all the differences.
IE7 within IE8 understands the IE7 star hack. Because the CSS renders differently even though the selector support is the same, it may take a bit before I figure out the best filter.
The original version of the iPhone came with a Safari browser that did not support all CSS3 selectors. The currently active version of Safari on the iPhone does support all CSS3 selectors. The grid below has been updated to reflect that. I have kept the old version of the iPhone CSS3 support just in case you want to support "unlocked" version of the iPhone, that do not get updated as often. Personally, I assume all iphones hitting my apps support all CSS3. For more information on iPhones, see iPhone CSS Support
Safari 4.0 Beta was released Feb. 24, 2008. Since Safari 3.2 supported all CSS selectors, this Safari 4 part of the post may be a bit mute. Safari 4 beta also supports ARIA and for CSS effects, animation and canvas. It also seems to have many more native debugging tools native to the application (or maybe what I see is a carry over from the tools I installed in my previous version of Safari). Safari 4 is Acid 3 compliant!
IE8 Notes:
IE7 within IE8 Notes:
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
CSS选择器可以包括,标签选择器、类别选择器、ID选择器、交集选择器、并集选择器、后代选择器、全局选择器、伪类等,这些样式应用都已经在flex得到支持1.标签选
$的选择器部分:凡是运用$,其返回值是一个object$选择器主要用于选择标签.基本用法是同css的选择器.但是,很让人兴奋的是,他支持常见的浏览器,而css中
什么是选择器?选择器的作用是通过它可以找到元素,把css样式传递给元素!css选择器主要分为:基本选择器、属性选择器、组合选择器与伪类选择器四个大类!css基本
jQuery允许开发者使用从CSS1到CSS3几乎所有的选择器,以及jQuery独创的高级而复杂的选择器。另外还可以加入插件使其支持XPath选择器,甚至开发者
下面是css2selector的语法,当然很多浏览器只是支持其中的一部分,Prototype中的Selector主要支持tag选择器、class选择器和id选择