类型选择符。 以文档语言对象(Element)类型作为选择符。
td{font-size:14px;width:120px;}
属性选择器 /* 所有具有title属性的h对象 */
span[class=demo] { color: red; }
包含选择符 包含选择符。选择所有被 E1 包含的 E2 。即 E1.contains(E2)==true 。
table td { font-size:14px; }
ID选择符。 以文档目录树(DOM)中作为对象的唯一标识符的 ID 作为选择符。
#note { font-size:14px; width:120px;}
类选择符。在HTML中可以使用此种选择符。
div.note{font-size:14px;}
|