CSS3在CSS2的基础上对属性选择器进行了扩展,使得属性选择器有了通配符的概念。
[img]http://dl2.iteye.com/upload/attachment/0105/0778/749cb6fa-06c4-3bc3-be3b-d8422f738eb9.png[/img]
[img]http://dl2.iteye.com/upload/attachment/0105/0778/749cb6fa-06c4-3bc3-be3b-d8422f738eb9.png[/img]
<style type="text/css">
a[class^="column"]{
background:red;
}
a[href$="doc"]{
background:green;
}
a[title*="box"]{
background:blue;
}
</style>
</head>
<body>
<a href="##" class="columnNews">背景红色</a>
<a href="##" class="columnVideo">背景红色</a>
<a href="##" class="columnAboutUs">背景红色</a><br/>
<a href="1.doc">背景绿色</a>
<a href="2.doc">背景绿色</a><br/>
<a href="##" title="this is a box">背景蓝色</a>
<a href="##" title="box1">背景蓝色</a>
<a href="##" title="two boxs">背景蓝色</a>
</body>