源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> <style> p:first-letter { color:#ff0000; font-size:xx-large; } </style> </head> <body> <p>你可以使用 "first-letter" 偽元素向文本的首字母設置特殊樣式:</p> </body> </html>
運行結果