color:(text的color)
<style type="text/css">
html,body,h1,p{
color:gray;
}
</style>
direction:(text的方向)
html,body,h1,p{
direction:rtl;
书写从右向左。
direction:ltr;
书写从左向右。
}
line-height:(text每一行之间的距离)
p {
line-height:normal;
默认的行高
line-height:50;
设置的行高
line-height:10%;
使用百分比设置
}
letter-spacing:(字符之间的距离)
p {
letter-spacing:normal;
默认设置;
letter-spacing:6px;
自定义设置
letter-spacing:-60px;
设置负值。
}
text-align
:(字符对齐方式)
left:左对齐
right: 右对齐
center:中间对齐
justify:两边对齐(难)
text-decoration:(text的修饰)
h1 { text-decoration: overline }
h2 { text-decoration: line-through }
h3 { text-decoration: underline }
h4 { text-decoration: blink }
h5 { text-decoration: none }
效果:
text-indent:(文本的缩进)
{
text-indent:10px / 10% / 10em; 负值的话在数字前加“-”
}
text-transform:(文本的字母大小写)
{ text-transform: none }
无变化
{ text-transform: uppercase }
字母全大写
{ text-transform: lowercase }
字母全部小写
{ text-transform: capitalize }
字母的开头大写
white-space:(元素中空白处理方式)
word-spacing:(字符间隔)
{ word-spacing:normal }
标准的默认字符间隔
{ word-spacing:10px / 5% }