Proprietà Style listStyleType
- Pagina precedente listStylePosition
- Pagina successiva Margine
- Torna al livello superiore Oggetto Style HTML DOM
Definizione e uso
listStyleType
Imposta o restituisce il tipo di etichetta dell'elemento dell'elenco.
Vedi anche:
Guida CSS:Elenco CSS
Manuale CSS:Proprietà list-style-type
Manuale HTML DOM:Proprietà listStyle
Esempio
Esempio 1
Cambia il tipo di etichetta dell'elemento dell'elenco in "upper-roman":
document.getElementById("myList").style.listStyleType = "upper-roman";
Esempio 2
Tutti i diversi tipi di stili di elenco:
var listValue = selectTag.options[selectTag.selectedIndex].text; document.getElementById("myList").style.listStyleType = listValue;
Example 3
Returns the list item marker type:
alert(document.getElementById("myList").style.listStyleType);
Syntax
Return the listStyleType attribute:
object.style.listStyleType
Set the listStyleType attribute:
object.style.listStyleType = value
Attribute value
Value | Description |
---|---|
armenian | The marker is the traditional Armenian numbering. |
circle | The marker is a circle. |
cjk-ideographic | The marker is a simple ideographic number. |
decimal | The marker is a number. This is the default value for <ol>. |
decimal-leading-zero | The marker is a number with a leading zero (01, 02, 03, etc.). |
disc | The marker is a solid circle. This is the default value for <ul>. |
georgian | The marker is the traditional Georgian numbering. |
hebrew | The marker is the traditional Hebrew numbering. |
hiragana | The marker is the traditional Hiragana numbering. |
hiragana-iroha | The marker is the traditional Hiragana Iroha numbering. |
katakana | The marker is the traditional katakana numbering. |
katakana-iroha | The marker is the traditional Iroha katakana numbering. |
lower-alpha | The marker is lowercase English letters (a, b, c, d, e, etc.). |
lower-greek | The marker is lowercase Greek letters. |
lower-latin | The marker is lowercase Latin letters (a, b, c, d, e, etc.). |
lower-roman | The marker is lowercase Roman numerals (i, ii, iii, iv, v, etc.). |
none | Does not display the marker. |
square | The marker is a square. |
upper-alpha | The marker is uppercase English letters (A, B, C, D, E, etc.). |
upper-latin | The marker is uppercase Latin letters (A, B, C, D, E, etc.). |
upper-roman | The marker is uppercase Roman numerals (I, II, III, IV, V, etc.). |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | <ul> is set to "disc", <ol> is set to "decimal". |
---|---|
Return value: | A string that indicates the type of list. |
CSS version: | CSS1 |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supporto | Supporto | Supporto | Supporto | Supporto |
- Pagina precedente listStylePosition
- Pagina successiva Margine
- Torna al livello superiore Oggetto Style HTML DOM