CSS text-decoration-style

CSS text-decoration-style 定义和用法

text-decoration-style 属性规定线条如何显示。

默认值:solid
继承:
可动画化:否。请参阅 可动画化(animatable)
版本:CSS3
JavaScript 语法:object.style.textDecorationStyle="wavy"

 

CSS text-decoration-style 语法

text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
知识兔

 

CSS text-decoration-style 属性值

描述
solid默认值。线条将显示为单线。
double线条将显示为双线。
dotted线条将显示为点状线。
dashed线条将显示为虚线。
wavy线条将显示为波浪线。
initial设置该属性为它的默认值。请参阅 initial
inherit从父元素继承该属性。请参阅 inherit

 

CSS text-decoration-style 浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

几乎所有的主流浏览器都不支持 text-decoration-style 属性。

Firefox 支持另一个可替代该属性的属性,即 -moz-text-decoration-style 属性。

 

CSS text-decoration-style 实例

在段落的下方显示一条波浪线:

p
{
text-decoration: underline;
-moz-text-decoration-style: wavy; /* 针对 Firefox 的代码 */
}
知识兔

在线课程

计算机