首页 > Web开发 > 详细

css样式表中四种属性选择器

时间:2014-02-07 09:54:29      阅读:442      评论:0      收藏:0      [点我收藏+]

学习此连接的总结
http://developer.51cto.com/art/201009/226158.htm
css样式表中四种属性选择器
1> 简易属性
tag[class]{ font-weight:bold }
It will affect all tag with any class.
e.g. <h2 class="old" > or <h2 class="new">
2>精确属性值
a[href="http://www.beilei123.cn"][title="textTitle"]{font-size:10%}
It will affect <a href="http://www.beilei123.cn"title="textTitle">
3>部分属性值
类似使用perl中得匹配
p[class~="urgent"] {font-weight:bold;}
input [type="checkbox"],
input [type="radio"],
input [type="file"]
footer[role="contentinfo"] a
4>统配属性
*[lang|="en"]{color:white;}
匹配连接lang或="en"字符的所有内容

此博客是网站www.beilei123.cn镜像,转载请注明出处。

css样式表中四种属性选择器

原文:http://www.cnblogs.com/beilei123/p/3539087.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!