<input type="text" readonly />
<img src="xxx" alt="正在加载" />
.g-box { display: block; position: relative; z-index: 2; top: 10px; left: 100px; float: left; width: 500px; height: 200px; margin: 10px; padding: 10px; border: 10px solid; background: #aaa; color: #000; font: 14px/1.5 sans-serif; }
.test { color: #000; /* For all */ color: #111\9; /* For all IE */ color: #222\0; /* For IE8 and later, Opera without Webkit */ color: #333\9\0; /* For IE8 and later */ color: #444\0/; /* For IE8 and later */ *color: #666; /* For IE7 and earlier */ _color: #777; /* For IE6 and earlier */ }
-执行效率从高到低排序:
1. id选择器(#myid)
2. 类选择器(.myclassname)
3. 标签选择器(div,h1,p)
4. 相邻选择器(h1+p)
5. 子选择器(ul < li)
6. 后代选择器(li a)
7. 通配符选择器(*)
8. 属性选择器(a[rel=”external”])
9. 伪类选择器(a:hover, li:nth-child)