Vlastnost CSS text-decoration-line
Příklad
Nastavte různé typy textových dekoračních čar:
div.a
{
text-decoration-line: overline;
}
div.b
{
text-decoration-line: underline;
}
div.c
{
text-decoration-line: line-through;
}
div.d
{
text-decoration-line: overline underline;
}
Definice a použití
Vlastnost text-decoration-line
nastavuje druh textové dekorace, která se má použít (jako podtržení, přetržení, přeškrtnutí).
Tip: Podívejte se také na vlastnost text-decoration , což je zkrácená vlastnost pro text-decoration-line, text-decoration-style a text-decoration-color.
Poznámka: Můžete také zkombinovat více než jednu hodnotu, například podtržení a podtržení, abyste zobrazili řádky pod i nad textem.
Výchozí hodnota: | žádný |
---|---|
Zděděno: | Ne |
Animovatelné: | Ne. Přečtěte si o tématu Animable |
Verze: | CSS3 |
Syntaxe JavaScriptu: | objekt .style.textDecorationLine="overline" |
Podpora prohlížeče
Čísla v tabulce určují první verzi prohlížeče, která plně podporuje vlastnost.
Čísla následovaná -moz- nebo -webkit- určují první verzi, která pracovala s předponou.
Property | |||||
---|---|---|---|---|---|
text-decoration-line | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 7.1 -webkit- |
44.0 |
Syntaxe CSS
text-decoration-line: none|underline|overline|line-through|initial|inherit;
Hodnoty vlastností
Value | Description | Play it |
---|---|---|
none | Default value. Specifies no line for the text-decoration | |
underline | Specifies that a line will be displayed under the text | |
overline | Specifies that a line will be displayed over the text | |
line-through | Specifies that a line will be displayed through the text | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Související stránky
CSS tutoriál: CSS Text
Odkaz HTML DOM: vlastnost textDecorationLine