CSS Text

text formatting
这个文本的文本格式属性的一些风格.标题使用文本对齐,文本转换和色彩的属性.该段缩进,对齐,并指定字符之间的空间.

Text Color (文字颜色)
颜色属性是用来设置文字的颜色.
使用CSS,颜色最常见的指定:
    a HEX value - like "#ff0000"
    an RGB value - like "rgb(255,0,0)"
    a color name - like "red"
CSS颜色值在寻找一个可能的颜色值的完整列表.
一个网页的默认颜色是指在体内(body)的选择.
Example
    body {color:blue;}
    h1   {color:#00ff00;}
    h2   {color:rgb(255,0,0);}
对于W3C标准的CSS备注:如果你定义的颜色属性,你还必须定义的背景色属性.

Text Alignment (文字对齐方式)
文本排列属性是用来设置文本的水平对齐.
文本可居中或对齐到左或右,或合理.
当文本对齐设置为"justify",每条生产线被拉长,使每行宽度相等,左,右页边距是直的(如杂志和报纸).
Example
    h1     {text-align:center;}
    p.date {text-align:right;}
    p.main {text-align:justify;}

Text Decoration (文本描述)
text - decoration属性用来设置或删除文本的描述.
text - decoration属性主要是用来删除从设计目的的链接强调:
Example
    a {text-decoration:none;}
它也可以用来修饰文本:
Example
    h1 {text-decoration:overline;}
    h2 {text-decoration:line-through;}
    h3 {text-decoration:underline;}
    h4 {text-decoration:blink;}
注意:这不是建议,强调,是不是一个链接的文本,因为这往往混淆了用户.

Text Transformation (文本转换)
文本转换属性是用来指定在文本中的大写和小写字母.
它可以用于一切都变成大写或小写字母,或每个单词首字母大写.
Example
    p.uppercase  {text-transform:uppercase;}
    p.lowercase  {text-transform:lowercase;}
    p.capitalize {text-transform:capitalize;}

Text Indentation (文本缩进)
文本缩进属性是用来指定文本的第一行的缩进.
Example
    p {text-indent:50px;}
 

上一篇:CSS Font | 下一篇:已经是最后篇