css基础
========= CSS 基础 ======== css - 空格大小写敏感 ----------------------------- class, id对大小写是敏感的 CSS - 派生选择器 li strong { font-style: italic; font-weitht: normal; } //只有li下的strong标签才会采用这种格式。 ----------------------------------- ID选择器(应用的最广泛) #red {color: red;}
//大小写必需完全一样
可以与ID选择器互换 .classname{...}//可以在任意地方使用。 ---------------------------- 伪类选择器 a:link {color:#ff0000} a:visited {color: #00ff00} a:hover {color:..} a:active {...} ------------------------ * 复合选择器的优先级计算(重要) ID选择器(100) > 类选择器(10) > 标记选择器(1) #h1 {color:red} .h1 {...} h1 {...}