Scheda Stile Proprietà dimensione
Esempio
Imposta la tabSize di un elemento <pre>:
document.getElementById("myPRE").style.tabSize = "16";
Definizione e utilizzo
La proprietà tabSize specifica la lunghezza dello spazio utilizzato per il carattere di tabulazione.
In HTML, il carattere tab viene solitamente visualizzato come un singolo carattere spazio, ad eccezione di alcuni elementi, come <textarea> e <pre>, e il risultato della proprietà tabSize sarà visibile solo per questi elementi.
Supporto browser
Property | |||||
---|---|---|---|---|---|
tabSize | Yes | 79.0 | Not supported Use MozTabSize |
6.1 | 15.0 |
Sintassi
Restituisce la proprietà tabSize:
object.style.tabSize
Imposta la proprietà tabSize:
object.style.tabSize = "number|length|initial|inherit"
Valori di proprietà
Value | Description |
---|---|
number | Default value 8. Specifies the number of space-characters that should be displayed for each tab-character |
length | Specifies the length of a tab-character. This property value is not supported in any of the major browsers |
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: | 8 |
---|---|
Valore di ritorno: | Una stringa, che rappresenta la proprietà tab-size di un elemento |
Versione CSS | CSS3 |
Pagine correlate
Riferimento CSS: proprietà tab-size
❮ Oggetto stile