CSS 文本装饰

CSS 文字装饰

文字装饰

text-decoration 属性用于设置或删除文本装饰。

text-decoration: none; 通常用于从链接上删除下划线:

实例

a {  text-decoration: none;}

亲自试一试

其他 text-decoration 值用于装饰文本:

实例

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

亲自试一试

注释:建议不要在非链接文本加下划线,因为这经常会使读者感到困惑。