字体属性
属性 | 含义 | 属性值 |
font-family | 字体 | 各种字体 |
font-style | 字体样式 | italic、oblique |
font-variant | 小体大写 | small-caps |
font-weight | 字体粗细 | bold、bolder、lither… |
font-size | 字体大小 | absolute、relative、% |
color | 字体颜色 | 颜色值 |
颜色与背景属性
属性 | 含义 | 属性值 |
color | 颜色 | 颜色值 |
background-color | 背景色 | 颜色值 |
background-image | 背景图案 | 图片路径 |
background-repeat | 背景图案重复方式 | repeat-x | repeat-y | no-repeat |
background-attachment | 背景的滚动 | scroll | fix |
background-position | 背景图案初始位置 | % | nem | top | left | right | bottom … |
文本属性
属性 | 含义 | 属性值 |
word-spacing | 单词间距 | n em |
letter-spacing | 字母间距 | n em |
text-decoration | 装饰样式 | underline| overline| line-through| blink |
vertical-align | 垂直方向位置 | sub| super |top |text-top| middle| bottom| text-bottom |
text-transform | 转为其他形式 | capitalize| uppercase| lowercase |
text-align | 对齐 | left| right| center| justify |
text-indent | 缩进 | n em| % |
line-height | 行高 | pixels、n em、% |
边距属性
属性 | 含义 | 属性值 |
margin-top | 上边距 | n em | % |
margin-right | 右 | n em | % |
margin-bottom | 下 | n em | % |
margin-left | 左 | n em | % |
填充属性
属性 | 含义 | 属性值 |
padding-top | 上填充 | n em | % |
padding-right | 右 | n em | % |
padding-bottom | 下 | n em | % |
padding-left | 左 | n em | % |
边框属性
属性 | 含义 | 属性值 |
border-top-width | 上边框宽度 | n em | thin | medium | thick |
border-right-width | 右 | 同上 |
border-bottom-width | 下 | 同上 |
border-left-width | 左 | 同上 |
border-width | 四边 | 同上 |
border-color | 边框颜色 | Color |
border-style | 边框样式 | dotted | dash | solid | double | groove | ridge | inset | outset |
border-top |right|bottom|left | 上(右|底|左)所有属性 | border-width | border-style | color |
图文混排
属性 | 含义 | 属性值 |
width | 宽度 | n em | % |
height | 高度 | n em |
float | 文字环绕 | left | right |
clear | 去除文字环绕 | left | right | both |
列表属性
属性 | 含义 | 属性值 |
display | 是否显示 | block | inline | list-item | none |
white-space | 空白部分 | pre | nowrap | normal(是否合并) |
list-style-type | 项目编号 | disc|circle|square|decimal|lower-roman|upper-roman|lower-alpha|upper-alpha|none |
list-style-image | 项目前图片 | img-url |
list-style-position | 第二行位置 | inside | outside |
list-style | 全部属性 | keyword | position | url |
鼠标属性
属性值 | 含义 | 属性值 | 含义 |
auto | 自动 | n-resize | 上箭头 |
crosshair | "+" | se-resize | 右下 |
default | 默认 | sw-resize | 左下 |
hand | 手形 | s-resize | 下箭头 |
move | 移动 | w-resize | 左箭头 |
e-resize | 右箭头 | text | "I" |
ne-resize | 右上 | wait | 沙漏 |
nw-resize | 左上 | help | 帮助 |
定位属性
属性 | 含义 | 属性值 |
position | 位置 | absolute|relative|static |
left | top | 横向|纵向位置 | N em | % |
width | height | 宽度|高度 | 同上 |
clip | 剪切 | shape | auto |
overflow | 内容超出时 | visible | hidden | scroll | auto |
z-index | 在深度上定位元素 | int |
visibility | 可见性 | inherit | visible | hidden |
滤镜属性
属性值 含义 属性值 含义
alpha 半透明 invert 底片
blur 模糊 light 灯光投影
chroma 制定颜色透明 mask 透明膜
dropshadow 投射阴影 shadow 阴影
fliph 水平翻转 wave 波纹
flipv 垂直翻转 xray X射线
glow 光效 grayscale 灰度