、
font:
指定
DIV
中⽂本的样式,其后可跟⽂本的多个样式。
font-family:
设置要⽤的字体名称;
font-weight:
指定⽂本的粗细
,
其值有
bold
bolder lighter
等;
font-size:
指定⽂本的⼤⼩;
font-style:
指定⽂本样式,其值有
italic normal oblique
等;
color:
指定⽂本颜⾊;
text-align:
指定
⽂本⽔平对齐⽅式,其值有
center(
居中
) left right justify
;
text-decorator:
⽤于⽂本的修饰;其值有
none underline overline line-through
和
blink
的组合;
text-indent:
设置⽂本的缩进;
text-transform:
设置⽂本的字母⼤⼩写。其值有
lowercase uppercase capitalize(
⾸字母⼤写
)
none
;
direction:
内容的流向。其值有
ltr(
从左⾄右
)
、
rtl(
从右⾄左
)
;
line-height:
指定⽂本的⾏⾼;
Word-spacing:
字间距。
7
、
overflow:
内容溢出控制,其值有
scroll(
始终显⽰滚动条
)
、
visible(
不显⽰滚动条,但超出部分可见
)
、
auto(
内容超出时显⽰滚动条
)
、
hidden(
超出时隐藏内容
)
。
⼆、⼀些特殊效果:
1
、
z-index:
设置
DIV
的层叠顺序。
⽤
z-index
属性时,
position
必需要指定为
absolute
才⾏
。
2
、
cursor:
设置
DIV
上光标的样式。
3
、
clip:
设置剪辑矩形。
clip:rect(top right bottom left);
设置上下左右的距离
,
但此时要把
position
指定为
absolute
。
4
、
opacity
透明度
filter:alpha(opacity=value) eg
:
filter:alpha(opacity=50);opacity:0.5;