Latest web development tutorials

HTML DOM Style textDecorationStyle property

Style Object Reference Style Objects

Examples

Displayed at the bottom of a wavy line of the paragraph:

document.getElementById("myP").style.textDecorationStyle="wavy";

try it"

Definition and Usage

textDecorationStyle property sets or returns how to display the lines.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Almost all of the major browsers do not support textDecorationStyle property.

Firefox supports another alternative of the property attribute that MozTextDecorationStyle property.


grammar

Back textDecorationStyle properties:

object .style.textDecorationStyle

Setting textDecorationStyle properties:

object .style.textDecorationStyle="solid|double|dotted|dashed|wavy|initial|inherit"

Property Value

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

technical details

Defaults: solid
return value: String representing the text-decoration-style attribute of the element.
CSS version CSS3


related articles

CSS Reference: text-Decoration-style property


Style Object Reference Style Objects