CSS text-decoration-line Eigenschap
Voorbeeld
Stel verschillende soorten tekstdecoratielijnen in:
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;
}
Definitie en gebruik
De text-decoration-line
eigenschap stelt het soort tekstdecoratie in dat moet worden gebruikt (zoals onderstrepen, overlijnen, doorstrepen).
Tip: Kijk ook naar de eigenschap text-decoration , een verkorte eigenschap voor text-decoration-line, text-decoration-style en text-decoration-color.
Opmerking: u kunt ook meer dan één waarde combineren, zoals onderstrepen en bovenstrepen om lijnen zowel onder als boven de tekst weer te geven.
Standaardwaarde: | geen |
---|---|
geërfd: | Nee |
Animeerbaar: | Nee. Lees over animeren |
Versie: | CSS3 |
JavaScript-syntaxis: | object .style.textDecorationLine="overline" |
Browserondersteuning
De getallen in de tabel geven de eerste browserversie aan die de eigenschap volledig ondersteunt.
Getallen gevolgd door -moz- of -webkit- specificeren de eerste versie die met een prefix werkte.
Property | |||||
---|---|---|---|---|---|
text-decoration-line | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 7.1 -webkit- |
44.0 |
CSS-syntaxis
text-decoration-line: none|underline|overline|line-through|initial|inherit;
Eigendomswaarden
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 |
Gerelateerde pagina's
CSS-zelfstudie: CSS-tekst
HTML DOM-referentie: eigenschap textDecorationLine