空白字元: white-space
normal 預設,會忽略空白、nowrap 不換行,直到遇見<br>、pre 會保留空白與<pre>類似、pre-line 合併空白- <p style="white-space: normal;">
- This is a
- test
- sentence.
- </p>
- <p style="white-space: pre;">
- This is a
- test
- sentence.
- </p>
- <p style="white-space: pre-line;">
- This is a
- test
- sentence.
- </p>
複製代碼 大小寫轉換: text-transform
normal 預設、capitalize 第一個字大寫、uppercase 轉大寫、lowercase 轉小寫- p{
- text-transform: capitalize;
- }
複製代碼 文字陰影: text-shadow
text-shadow: 水平|垂直|模糊範圍|顏色;- #shadow {
- text-shadow: 5px 5px 5px blue;
- }
複製代碼 |