English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Le texte-decoration-L'attribut lineCSS spécifie quel type de motif est ajouté à l'élément. Cet attribut peut accepter une ou plusieurs valeurs séparées par des espaces.
下表为此属性的用法说明和版本历史记录,以及该属性在javascript脚本中的使用语法。
默认值: | none |
---|---|
适用于: | 所有元素。它也适用于::first-letter和::first-line。 |
继承: | 没有 |
可动画制作: | 否。请参见 属性动画。 |
版本: | CSS3的新功能 |
语法 JavaScript: | object.style.textDecorationLine="underline" |
该属性的语法如下:
text-decoration-line: none | [ underline | overline | line-through | blink ] one or more values | initial | inherit
下面的示例演示了如何使用text-decoration-属性 line。
p { -moz-text-decoration-line: underline; /* Firefox */ text-decoration-line: underline; } p.multiple { -moz-text-decoration-line: underline overline; /* Firefox */ text-decoration-line: underline overline; }测试看看‹/›
下表描述了此属性的值。
值 | 描述 |
---|---|
none | 文字没有修饰。这是默认值。 |
underline | 每行文本都带有下划线。 |
overline | 每行文字上方都有一条线。 |
line-through | 每一行文字中间都有一条线。 |
blink | 使文本闪烁(在可见和不可见之间切换)。不推荐使用此值,而推荐使用动画。 |
initial | 将此属性设置为其默认值。 |
inherit | 如果指定,则关联元素采用其父元素text-decoration-值属性 line |
text-decoration-大多数浏览器均不支持该属性。
|
警告:text-decoration-警告:大多数浏览器当前不支持该属性。您最好避免使用此属性。
属性相关:text-decoration,text-decoration-color,text-decoration-style。