亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

文本格式


文本顏色

顏色屬性被用來設置文字的顏色。

顏色是通過CSS最經(jīng)常的指定:

  • 十六進制值 - 如:?#FF0000

  • 一個RGB值 - 如:?RGB(255,0,0)

  • 顏色的名稱 - 如:?red


文本的對齊方式

文本排列屬性是用來設置文本的水平對齊方式。

文本可居中或?qū)R到左或右,兩端對齊.

當text-align設置為"justify",每一行被展開為寬度相等,左,右外邊距是對齊(如雜志和報紙)。


文本修飾

text-decoration 屬性用來設置或刪除文本的裝飾。

從設計的角度看 text-decoration屬性主要是用來刪除鏈接的下劃線(右側(cè)實例),也可以這樣裝飾文字:

h1?{text-decoration:overline;}
h2?{text-decoration:line-through;}
h3?{text-decoration:underline;}

效果圖:

1.jpg


文本轉(zhuǎn)換

text-transform屬性是用來指定在一個文本中的大寫和小寫字母。

可用于所有字句變成大寫或小寫字母,或每個單詞的首字母大寫。

示例:

p.uppercase?{text-transform:uppercase;}/*?全部大寫*/
p.lowercase?{text-transform:lowercase;}/*?全部小寫*/
p.capitalize?{text-transform:capitalize;}/*?首字母大寫*/


文本縮進

text-indent屬性是用來指定文本的第一行的縮進。

示例:首行縮進50px

p?{text-indent:50px;}

繼續(xù)學習
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> h1 { text-align: center; text-transform: uppercase; color: #A7C942; } p { text-indent: 50px; text-align:justify; letter-spacing:3px; } a { text-decoration:none; } </style> </head> <body> <h1>text formatting</h1> <p>This text is styled with some of the text formatting properties. The heading uses the text-align, text-transform, and color properties. The paragraph is indented, aligned, and the space between characters is specified. The underline is removed from the <a target="_blank" href="#">"嘗試一下"</a> link.</p> </body> </html>
提交重置代碼