Stile proprietà wordWrap
Esempio
Consenti alle parole lunghe di essere in grado di interrompersi e di passare alla riga successiva:
document.getElementById("myDIV").style.wordWrap = "break-word";
Definizione e utilizzo
La proprietà wordWrap consente alle parole lunghe di essere spezzate e di passare alla riga successiva.
Supporto browser
Property | |||||
---|---|---|---|---|---|
wordWrap | Yes | Yes | Yes | Yes | Yes |
Sintassi
Restituisce la proprietà wordWrap:
object.style.wordWrap
Imposta la proprietà wordWrap:
object.style.wordWrap = "normal|break-word|initial|inherit"
Valori di proprietà
Value | Description |
---|---|
normal | Break words only at allowed break points |
break-word | Allows unbreakable words to be broken |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Dettagli tecnici
Valore di default: | normale |
---|---|
Valore di ritorno: | Una stringa, che rappresenta la proprietà di a capo automatico di un elemento |
Versione CSS | CSS3 |
Pagine correlate
Riferimento CSS: proprietà word-wrap
❮ Oggetto stile