2014年4月1日

css选择器与DOM'匹配的关系

摘要: 一道面试题css 选择器匹配时,只考察是否包含有对应的class,而与class的顺序无关而css的定义是后面的覆盖前面的定义原理:http://www.w3.org/html/ig/zh/wiki/CSS2/selector#class.E9.80.89.E6.8B.A9.E5.99.A8DEMO:http://jsfiddle.net/VCk9U/text 1text 2text 3text 4.a { color: red;}.b { color: blue;}.a.b { color: green;}.b.a { color: yellow; }输出结果: 阅读全文

posted @ 2014-04-01 21:05 yuanpeng 阅读(452) 评论(0) 推荐(0) 编辑

导航