Style listStyleImage property
- Forrige side listStyle
- Næste side listStylePosition
- Gå tilbage et niveau HTML DOM Style Objekt
Definition and usage
listStyleImage
Sets or returns an image as the marker for list items.
See also:
CSS Tutorial:CSS liste
CSS Reference Manual:list-style-image property
HTML DOM Reference Manual:listStyle property
Example
Example 1
Specifies the image as the marker for list items in the list:
document.getElementById("myList").style.listStyleImage = "url('sqorange.gif')";
Example 2
Returns the list-style-image property value:
alert(document.getElementById("myList").style.listStyleImage);
Syntax
Returns the listStyleImage property:
object.style.listStyleImage
Sets the listStyleImage property:
object.style.listStyleImage = "none|url|initial|inherit"
Attribute value
Value | Description |
---|---|
none | Does not display any image. Default. |
url | Specifies the path of the image. |
initial | Sets this property to its default value. See also initial. |
inherit | Inherits this property from its parent element. See also inherit. |
Technical details
Default value: | none |
---|---|
Return value: | A string that represents the path to the image. |
CSS version: | CSS1 |
Browserstøtte
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
- Forrige side listStyle
- Næste side listStylePosition
- Gå tilbage et niveau HTML DOM Style Objekt