CSS基础:
- id选择器:用#定义(结合div)
- class选择器:用.定义(结合div)
- 背景:background-color:背景色;background-image:背景图像;background-repeat:背景重复;background-position:位置;background-attachment关联
- 文本:text-intent:缩进;text-align:水平对齐;word-spacing:字间隔;letter-spacing:字母间隔;text-transform:大小写转换;text-decoration:文本装饰
- 字体:font-family:字体;font-style:倾斜;font-weight:加粗;font-size:字体大小
- 链接:a:link a:visited a:hover a:active text-decoration:下划线
- 列表:list-style:属性;list-style-type:标志类型;list-style-image:图像标志;list-style-position:标志位置
- 表格:border:边框;border-collapse:折叠边框;text-align:水平对齐;vertical-align:垂直对齐
- 轮廓:outline:轮廓属性;outline-color outline-style outline-width
CSS框模型:
- 框模型:element padding(内边距) margin(外边距) border(边框)
- 内边距:padding: top right bottom left
- 边框:border: border-style;border-width;border-color
- 外边距:margin: top right bottom left
- 定位:position: static relative(相对定位) absolute(绝对定位) fixed(固定定位)overflow(溢出区域(auto))
- 浮动:float: left right none inherit(except IE)
CSS选择器:
- 元素选择器:*:通配符
- 类选择器:.
- ID选择器:#
- 属性选择器:[attribute]
- 后代选择器:h1 em {color:red}
- 子元素选择器:h1 > strong 结合:table.company td > p
- 相邻兄弟选择器: h1 + p {margin-top:50px;}
- 伪类:a:link{color:blue};a:visited:{};a:hover{};a:active{}
CSS高级:
- 对齐:(1)margin-left:auto;margin-right:auto;(2):position:absolute;(3):float:right;
- 尺寸:height:元素高度;line-height:行高;max-height:元素最大高度;max-width:元素最大宽度;min-height:元素最小高度;min-width;width
- 分类:display:inline none block;float;clear;cursor;position;visibility
- 导航栏: