我不知道属性选择器的特殊性是什么。 例如:
- ID = 100分
- 类= 10分
- HTML标记= 1分
例:
/* this specificity value is 100 + 10 + 1 = 111 */
#hello .class h2 { }
有了这个HTML:
<div class="selectform">
<input type="text" value="inter text">
<input type="text" value="inter text" class="inputag">
</div>
其中这2所选择的是更具体的?
.selectform input[type="text"] { }
.selectform .inputbg { }
检查演示 http://tinkerbin.com/IaZW8jbI