【CSS3】Advanced6:Attribute Selectors

1.with the attribute

abbr[title]{color:red}

2.with the attribute and it's value

input[type=text][disabled]{200px;}

3.

CSS 3 further allows you to match an attribute without being exact:

  • [attribute^=something] will match a the value of an attribute that begins with something.
  • [attribute$=something] will match a the value of an attribute that ends with something.
  • [attribute*=something] will match a the value of an attribute that contains something, be it in the beginning, middle, or end.
原文地址:https://www.cnblogs.com/yzhen/p/3667656.html