CSS基本样式
背景: 可使用纯色,或者背景图像创建复杂的效果
属性 | 描述 |
---|---|
backgroound-attachment | 背景图像是否固定或者随着滚动 |
background-color | 背景颜色 |
background-image | 背景图片 |
background-position | 背景图片的起始位置 |
background-repeat | 背景图是否重复以及如何使用 |
backgroud-size | 固定图片的尺寸 |
background-origin | 固定图片的定位区域 |
background-clip | 规定背景的绘制区域 |
文本:根据改变属性来改变文本的外观
属性 | 描述 |
---|---|
color | 文本颜色 |
direction | 文本方向 |
line-height | 行高 |
letter-spacing | 字符间距 |
text-align | 文本对齐方式 |
text-decoration | 添加修饰 |
text-indent | 缩进首行 |
text-transform | 元素中的字母 |
unicode-bidi | 文本方向 |
white-space | 空白处理方式 |
word-spacing | 字间距 |
字体:不同字体
属性 | 描述 |
---|---|
font-family | 字体系列 |
font-size | 字体大小 |
font-style | 字体风格 |
font-variant | 字形遍体 |
font-weight | 字体粗细 |
链接
四种状态:
link 普通,未被点击
visited 用户已经访问过的
hover 鼠标位于链接上方
active 被点击时
列表
list-style : 简写列表项
list-style-image : 列表项图像
list-style-position : 列表标志位置
list-style-type: 列表类型
表格
- CSS 表格 table
- 表格边框 border
- 折叠边框 border-collapse
- 表格宽高 width height
- 表格文本对齐 text-align
- 表格内边距 padding
- 表格颜色 background-color
轮廓
突出元素的作用
outline 设置轮廓属性
outline-color 轮廓颜色
outline-style 轮廓样式
outline-width 轮廓宽度