Proprietà trattini CSS
Esempio
Imposta sillabazioni diverse:
div.a {
-webkit-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
div.b {
-webkit-hyphens: manual;
-ms-hyphens:
manual;
hyphens: manual;
}
div.c {
-webkit-hyphens:
auto;
-ms-hyphens: auto;
hyphens: auto;
}
Definizione e utilizzo
La hyphens
proprietà definisce se la sillabazione è consentita per creare più opportunità di ritorno a capo automatico all'interno di una riga di testo.
Valore di default: | Manuale |
---|---|
Ereditato: | sì |
Animabile: | no. Leggi su animabile |
Versione: | CSS3 |
sintassi JavaScript: | oggetto .style.hyphens="none" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
hyphens | 55.0 | 79.0 10.0 -ms- |
43.0 | 5.1 -webkit- | 44.0 |
Sintassi CSS
hyphens: none|manual|auto|initial|inherit;
Valori di proprietà
Value | Description |
---|---|
none | Words are not hyphenated |
manual | Default. Words are only hyphenated at ‐ or ­ (if needed) |
auto | Words are hyphenated where the algorithm is deciding (if needed) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |