In HTML, you can add a lot of additional information to an element through a variety of attributes. For example, a different div element can be distinguished by an id attribute.
Some property selectors have been introduced in CSS2, and CSS3 has extended the attribute selector on the basis of CSS2, adding 3 property selectors, which makes the property selector have the concept of wildcard character . These three property selectors, together with the CSS2 property selector, form the CSS's powerful property selector. As shown in the following table:
Examples show:
HTML code :
<ahref= "Xxx.pdf">I'm linking to a PDF file</a><ahref="#"class= "icon">My class name is icon</a><ahref="#"title= "My title is more">My title is more.</a>
CSS Code
A[class^=icon] { background: Green; color:#fff;} A[href$=pdf] { background: Orange; color: #fff;} A[title*=more] { background: Blue; color: #fff;}
The results show:
"CSS3"---property selector