Vlastnost CSS text-decoration-thickness
Příklad
Nastavte různou tloušťku dekorační čáry pro prvky <h1>, <h2>, <h3> a <h4>:
h1 {
text-decoration: underline;
text-decoration-thickness: auto;
}
h2 {
text-decoration: underline;
text-decoration-thickness: 5px;
}
h3 {
text-decoration: underline;
text-decoration-thickness: 50%;
}
/* Use shorthand property */
h4 {
text-decoration:
underline solid red 50%;
}
Definice a použití
Vlastnost text-decoration-thickness
určuje tloušťku linie dekorace.
Výchozí hodnota: | auto |
---|---|
Zděděno: | Ne |
Animovatelné: | ne, viz jednotlivé vlastnosti . Přečtěte si o tématu Animable |
Verze: | CSS4 |
Syntaxe JavaScriptu: | objekt .style.textDecorationThickness="5px" |
Podpora prohlížeče
Čísla v tabulce určují první verzi prohlížeče, která plně podporuje vlastnost.
Property | |||||
---|---|---|---|---|---|
text-decoration-thickness | 89.0 | 89.0 | 70.0 | 12.1 | 75.0 |
Syntaxe CSS
text-decoration-thickness:
auto|from-font|length/percentage|initial|inherit;
Hodnoty vlastností
Value | Description |
---|---|
auto | The browser chooses the thickness of the decoration line |
from-font | If a font file contains information about a preferred thickness, use that value. If not, behave as auto |
length/percentage | Specifies the thickness as a length or % |
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 reference: vlastnost text-decoration
CSS tutoriál: CSS Text Decoration