属性(property)
一、font
property name | value | unit | annot |
---|---|---|---|
font-size | 1,2,.. | PX、cm | 绝对长度单位:cm,in; 相对长度单位:px,em,% |
font-style | italic,normal | ||
line-height | normal | PX、EM | |
font-weight | bold,lighter,normal | ||
font-variant | small-caps | 小型大写字母 | |
text-transform | capitalize,uppercase | 大小写 | |
text-decoration | underline,overline | 修饰 |
二、background
property name | value | unit | annot |
---|---|---|---|
background-color | #FFFFFF | rgb | 色彩 |
background-image | url() | 图片 | |
background-repeat | no-repeat | 重复 | |
background-attachment | fixed;(固定) scroll;(滚动) | 滚动 | |
background-position | left(水平) top(垂直); | 位置 |
三、Block
property name | value | unit | annot |
---|---|---|---|
letter-spacing | normal; num | rgb | 字间距 |
text-align | left;justify | 对齐 | |
text-indent | num | px | 缩进 |
vertical-align | text-top;baseline | 垂直对齐 | |
word-spacing | normal;num | 词间距 |
四、Box
property name | value | unit | annot |
---|---|---|---|
width | num | px | 宽度 |
height | num | px | 高度 |
float | num | px | |
margin | num | px | 外边距 |
padding | num | px | 内边距 |
border | num | px | 边框 |
五、Border
property name | value | unit | annot |
---|---|---|---|
border-style | dotted;dashed | ||
border-width | num | px | 边框宽度 |
border-color | # | RGB |
六、List-style
property name | value | unit | annot |
---|---|---|---|
list-style-type | disc;decimal | 圆点、数字 | |
list-style-position | outside;inside; | ||
list-style-image | url |
七、Position
property name | value | unit | annot |
---|---|---|---|
Position | absolute; relative; static; | ||
visibility | inherit; visible; hidden; | ||
overflow | visible; hidden; scroll; auto; | ||
clip | rect(12px,auto,12px,auto) | 裁切 |
1 Comment
CSS学习笔记 – xinzipanghuang.home · 2020年8月15日 at 22:33
[…] css属性总结 […]