背景相关
background-color | 背景颜色 |
---|---|
background-position | 背景定位 top|bottom|left|right percert 具体数值px |
background-image | 背景图片 |
background-repeat | 背景重复 no-repeat|repeat-x|repeat-y |
background-size | 背景大小 length|percent|cover|contain |
background-attachment | 背景关联 fixed |
对齐操作
内联文本 可以用 text-align 设置 left right center 针对块状元素需要设置适当的外边距实现
justify 两端对齐 自动调整文本间的间隔 保持每行长度一致
文本操作
字间隔 word-spacing 改变字(单词)间的标准间隔 默认为0
字母间隔 letter-spacing 修改字符间间隔
字符转换 text-transform 处理文本的大小写 none|uppercase|lowercase|captitalize
文本装饰 text-decoration none | underline | overline (上划线) | line-through (删除线) | blink (文本闪烁)
处理空白符 white-space normal (去除多余空白符 多个空白符也当做一个) | pre | nowrap (不换行) | pre_wrap | pre-line
文本缩进 text-indent
文字阴影 text-shadow:水平阴影 垂直阴影 模糊距离 阴影颜色 IE9及更早不支持
字体风格 font-style normal | italic(文本斜体显示)| oblique (文本倾斜显示)
字体加粗 font-weight 100-900 又细到粗 normal | bold | bolder
列表相关
列表类型 list-style-type square | circle
列表项图片 list-style-image
列表标志位置 list-style
CSS框模型 box-sizing
外边距合并 两个垂直外边距相遇时合成一个外边框,外边框高度等于较大者的。
定位与浮动
定位机制: 普通流(默认) | 浮动(float) | 绝对定位 (position)
position static | relative | absolute | fixed
浮动 脱离文档流 left | right