css can be composed by:
selector { property: value; }
1. type selector
h1 {color: #36c;}
2. universal selector
* {color: #365;}
3. descendent selector
ul em {text-transform: uppercase; }
4. class selector
Tag.classValue {border: 1px solid #c00;}
5. id selector
#idvalue { text-align: right; }
上面这些选择器是所有浏览器都支持的。下面的选择器属于css2,在ie7, firefox等版本进行支持,ie6就可能不支持了。
6. child selector
fatherTag>childTag{font-weight: bold;}
7. attribute selector
p[lang] p[lang="fr"] p[lang~="fr"] p[lang|="fr"]
==============
selector { property: value; }
1. type selector
h1 {color: #36c;}
2. universal selector
* {color: #365;}
3. descendent selector
ul em {text-transform: uppercase; }
4. class selector
Tag.classValue {border: 1px solid #c00;}
5. id selector
#idvalue { text-align: right; }
上面这些选择器是所有浏览器都支持的。下面的选择器属于css2,在ie7, firefox等版本进行支持,ie6就可能不支持了。
6. child selector
fatherTag>childTag{font-weight: bold;}
7. attribute selector
p[lang] p[lang="fr"] p[lang~="fr"] p[lang|="fr"]
==============