字体属性:
font-family
font-size
font-weight
- 十六进制值 - 如: #FF0000
- 一个RGB值 - 如: RGB(255,0,0)
- 颜色的名称 - 如: red
- rgba(255,0,0,0.3)
text-align # 对齐方式 left,right,center,justify
text-decoration # 装饰
text-decoration:none 常用来去掉a标签下划线
text-indent # 首行缩进
背景属性:
background-color
background-image
background-repeat:
repeat
repeat-x
repeat-y
no-repeat
background-position:
right top
200px 200px;
简写:
background: #ffffff url('1.png') no-repeat right top;
边框:
boder-width
boder-weight
boder-color
简写:
boder: 2px solid red;
单独设计样式:
boder-top-style:dotted
boder-top-color:red
boder-right-style:dashed
boder-bottom-style:none
boder-left-style:solid
display属性:
display:none 隐藏元素且不占用空间, visibility:hidden隐藏但占用空间
block
inline
inline-block
CSS盒子模型:
margin-top: 5px;
margin:5px,10px,15px,20px; 简写
magin:0,auto 常用居中
padding同理