CSS text-decoration 属性

CSS text-decoration 属性规定添加到文本的修饰

修饰的颜色由 "color" 属性设置

默认值: none
继承: no
版本: CSS1
JavaScript 语法: object.style.textDecoration="overline"

语法

text-decoration: none | underline | overline | line-through | blink | inherit

属性值

描述
none 默认。定义标准的文本
underline 定义文本下的一条线
overline 定义文本上的一条线
line-through 定义穿过文本下的一条线
blink 定义闪烁的文本
inherit 规定应该从父元素继承 text-decoration 属性的值

浏览器支持

下表中的数字表示支持该属性的第一个浏览器版本号

1.0 3.0 1.0 1.0 3.5

范例

设置 h1,h2,h3 和 h4 元素文本装饰

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

运行范例 »

相关文章

CSS 基础教程 CSS 文本

CSS 参考手册

关于   |   FAQ   |   我们的愿景   |   广告投放   |  博客

  简单教程,简单编程 - IT 入门首选站

Copyright © 2013-2022 简单教程 twle.cn All Rights Reserved.