跳到内容(1) Cob.com.cn

CodeCoke

CSS2.0中文手册·Attribute

您的位置:首页>>教程>>CSS2.0中文手册>>Attribute

Attribute

Attribute Selectors 属性选择符

语法:

  1.  E1[attr]
  2.  E1[attr=value]
  3.  E1[attr~=value]
  4.  E1[attr|=value]

说明:

示例:

h[title] { color: blue; }
/* 所有具有title属性的h对象 */
span[class=demo] { color: red; }
div[speed="fast"][dorun="no"] { color: red; }
a[rel~="copyright"] { color:black; }