常用文本樣式如下:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>text文本樣式</title> <style> h3{ /*text-indent:首行縮進*/ text-indent: -2em; padding-left:2em; /*text-shadow:必需。水平陰影的位置。允許負值。 必需。垂直陰影的位置。允許負值。 可選。模糊距離 可選。陰影顏色*/ text-shadow: 5px 5px 1px red; } p{ padding-left: 2em; /*text-wrap規定文本換行標准,配合width使用*/ width:200px; text-wrap: normal; } #p1{ /*text-transform屬性控制文本的大小寫*/ /*capitalize首寫字母大寫*/ text-transform: capitalize; } #p2{ /*lowercase全部小寫*/ text-transform: lowercase; } #p3{ /*uppercase全部大寫*/ text-transform: uppercase; } </style> </head> <body> <h3>title</h3> <p id="p1">this is a test text,this is a test text,this is a test text</p> <p id="p2">this is a test text,this is a test text,this is a test text</p> <p id="p3">this is a test text,this is a test text,this is a test text</p> </body> </html>
