list-style-image Attribute | listStyleImage参数属性
| DHTML文档教程 |
Sets or retrieves a value that indicates which image to use as a list-item marker for the object.
dhtml语法
HTML |
{ list-style-image : sLocation }
|
---|
Scripting | object.style.listStyleImage [ = sLocation ] |
---|
DHTML可能的值
sLocation | String that
specifies or receives one of the following values.none | Default. No image is specified. | url(sURL) | Location of the image, where sURL is an absolute or relative URL. |
|
The property is read/write
for all objects except the following, for which it is read-only:
currentStyle.
The property has a default value of
none. The Cascading Style Sheets (CSS) attribute is
inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.
remarks
the liststyleimage property can be applied to any element when margin and display:list-item are applied. the display:list-item property is available as of microsoft® internet explorer 6 and later.
when the image is available, it replaces the marker that is set with the liststyletype marker.
if the left margin of the list item is set to 0 using one of the margin properties, the list-item markers do not show. the margin should be set to a minimum of 30 points.
Examples
The following examples use the list-style-image attribute and the listStyleImage property to set the image for markers.
This example uses ul as a selector in an embedded (global) style sheet to set the marker to the dot.gif image.
<STYLE>
UL { list-style-image:url(dot.gif) }
</STYLE>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

This example uses inline scripting to change the style of the list-item marker to an image when an onmouseover event occurs.
<ul onmouseover="this.style.liststyleimage='url(dot.gif)'">
this feature requires microsoft® internet explorer 4.0 or later. click the following icon to install the latest version. then reload this page to view the sample.

是否符合公共标准
This property is defined in
Cascading Style Sheets (CSS), Level 1 (CSS1)
.
Applies To