【CSS3】Advanced6:Attribute Selectors

1.with the attribute

abbr[title]{color:red}

2.with the attribute and it's value

input[type=text][disabled]{width: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.

你可能感兴趣的:(attribute)