一、字体——font
1)大小|font-size: x-large;(特大) xx-small;(极小) 单位:PX、PD
2)样式 |font-style: oblique;(偏斜体) italic;(斜体) normal;(正常)
3) 行高|line-height: normal;(正常) 单位:PX、PD、EM
4) 粗细 |font-weight: bold;(粗体) lighter;(细体) normal;(正常)
5) 变体 |font-variant: small-caps;(小型大写字母) normal;(正常)
6)字体|font-family
二、文本——text
1) 修饰 |text-decoration: underline;(下划线) overline;(上划线) line-through;(删除线) blink;(闪烁)
2) 大小写 |text-transform: capitalize;(首字母大写) uppercase;(大写) lowercase;(小写) none;(无)
3)排列对齐|text-align:justify;left;right;center
4)缩进|text-indent:数值;inherit
5)阴影|text-shadow:数值
三、区块——block
1)行高|line-height: 数值;inherit;normal
2)字间距|letter-spacing: 数值;inherit;normal
3)词间距|word-spacing: 数值;inherit;normal
4)空格|white-space: pre(保留);nowrap(不换行);normal
5)显示|display
- none
- block(把内联标签变成块级标签)
- inline(把块级标签变成内联标签)
- list-item(列表项)
- run-in(追加部分)
- compact(紧凑)
- marker(标记)
- inline-table
- table-raw-group
- table-header-group
- table-footer-group
- table-raw
- table-column-group
- table-column
- table-cell
- table-caption|表格标题
五、盒子——box
1)width: 数值;百分比;auto
2)height: 数值;百分比;auto
3)清除|clear: none;left;right;both
4)边界|margin: 上 右 下 左
5)填充|padding: 上右 下 左
6)定位|position: relative;absolute;static;
7)透明度|visibility: visible;hidden;inherit
8)溢出|overflow: visible;hidden;scroll auto
9)裁切|clip: rect(12px,auto,12px,auto)
六、漂浮——float
float:left;right;none
七、定位——position
position: absolute;relative;fixed
八、透明度——opacity
opacity: 数值
九、背景——background
1)背景颜色|background-color:数值
2)背景图片|background-image:url()
3)背景图片重复|background-repeat:inherit;repeat;no-repeat;repeat-x;repeat-y
4)滚动|background-attachment:fixe;scroll
5)背景位置|background-position:数值;top;bottom;left;right;center(填写两个值时就是x和y值)
简写|background:背景颜色 背景图像 背景重复 背景附件 背景位置
十、边框——border
1)边框样式|border-style:dotted(点线);dashed(虚线);solid(实线);double(双线);groove(槽线);ridge(脊状);inset(凹陷);outset(凸显)
2)边框宽度|border-width
3)边框颜色|border-color:上 右 下 左
十一、列表样式——list-style
1)类型|list-style-type:none(不编号);decimal(阿拉伯数字);upper-alpha(大写英文字母);lower-alpha(小写英文字母);upper-roman(大写罗马数字);lower-roman(小写罗马数字);circle(空心圆圈);disc(实心圆圈);square(实心方块)
2)位置|list-style-position:inside;outside
3)图像|list-style-image:url
简写|list-style:类型 位置 url
十二、垂直——vertical
垂直方向排列|vertical-align:sub(下标字);super(上标字);top;bottom;middle;text-top;text-bottom
十三、链接——a
- a(所有超链接)
- a:link(超链接文字格式)
- a:visited(浏览过的链接文字格式)
- a:active(按下链接的格式)
- a:hover(鼠标转到链接时)
十四、光标——cursor
cursor:hand(手指);crosshair(十字体);move(箭头朝右);wait(漏斗);text(文字型);help(加问号);s-resize(箭头朝下);n-resize(箭头朝上);ne-resize(箭头朝右上);nw-resize(箭头朝左上);se-resize(箭头朝右下);sw-resize(箭头朝左下)