CSS text-decoration 用來控制文字的裝飾線,包括下劃線、刪除線、上劃線等。它常用於連結、已完成任務、優惠價格或特殊標記。
none:無裝飾。
underline:下劃線。
line-through:刪除線。
overline:上劃線。
其中 underline 最常見於連結,line-through 常用於表示原始價格或已完成項目。

HTML 中某些標籤預設帶有裝飾線,例如 u 會有下劃線,s 會有刪除線。若想移除,可設定:
text-decoration: none;
這在重置樣式或自訂連結外觀時很常見。

例如:
.thinkcss { text-decoration: underline; }
.thinkcss_1 { text-decoration: line-through; }
.thinkcss_2 { text-decoration: overline; }
這會分別產生下劃線、刪除線與上劃線效果。

text-decoration 是文字裝飾中很實用的屬性。它既能增加視覺提示,也能移除不必要的預設樣式。