如何使用CSS 属性选择器
1、属性选择器的外观与其它的选择器有所不同,这在声明上就可以看出来的。[title]{ color:red; }<h2 title="Hello world">Hello world</h2>

3、属性和值选择器。我们指定元素的时候可以从一个单词,到一些字母,只要包含相对应的单词就让元素的样式发生作用。<style type="text/css">[title~=hello]{color:red;}</style><body><h1>可以应用样式:</h1><h2 title="hello world">Hello world</h2><p title="student hello">Hello </h1><hr />

5、[attribute^=value] 这个属性选择器就是指以字母 value 开头的单词。在代码当中,这个词就是test .<style>div[class^="test"]{background:#ffff00;}</style>

7、[attribute*=value]这个选择器的使用,就是为了让元素当中包含value的单词。
