字体
属性 | 意义 |
font-family | 字体类型 |
font-size | 字体大小(用px) |
font-weight | 字体粗细 |
font-style | 字体样式(斜体/普通) |
文本外观
属性 | 意义 |
color | 字体颜色 |
text-align | 对齐方式 |
text-decoration | 装饰(underline overline line-through) |
text-indent | 首行缩进(px/em) |
line-height | 行间距 |
css的背景:背景颜色,背景图片,背景图片平铺,背景图片位置,背景图片固定
属性 | 用法 |
background-color | transparent|color; |
background-image | url(); |
background-repeat: | repeat|no-repeat|repeat-x|repeat-y; |
background-position | x y;(方位名词/精确单位) 方位名词:center right 和right center效果是一样的 精确单位:只有一个默认x坐标,另一个默认center 混合单位:第一个为x,第二个为y |
background-attachment | scroll|fixed |
设置半透明 rgba(0,0,0,0-1)
列表样式
list-style | 简写属性,按照 t p i 的顺序 |
list-style-type | none|disc|circle|square |
list-style-position | inside|outside(默认) |
list-style-image | none|url() |
盒子模型:margin border padding content
border:wsc(简写)
属性 | |
border-width | |
border-style | solid|dashed(虚线)|dotted(点) |
border-color | |
border-collapse | collapse(合并边框) |
padding:padding-top、padding-bottom、padding-left、padding-right
属性 | |
Padding:一个 | 上下左右 |
Padding:两个 | 上下 左右 |
Padding:三个 | 上 左右 下 |
Padding:四个 | 顺时针 |
(margin同padding,margin还有一个auto)
鼠标cursor的样式
属性值 | 描述 |
default | 默认 |
pointer | 小手 |
move | 移动 |
text | 文本 |
not-allowed | 禁止 |
vertical-align:baseline|top|middle|bottom
css3新加入
属性 | |
border-radius | length/百分比; 是一个简写值:左上 右上 左下 右下 |
box-shadow | h-shadow v-shadow blur spread color inset; |
text-shadow | h-shadow v-shadow blur color; |