list-style-type Attribute | listStyleType参数属性
| DHTML文档教程 |
Sets or retrieves the predefined type of the line-item marker for the object.
dhtml语法
HTML |
{ list-style-type : sType }
|
---|
Scripting | object.style.listStyleType [ = sType ] |
---|
DHTML可能的值
sType | String that
specifies or receives one of the following values.disc | Default. Solid circles. | circle | Outlined circles. | square | Solid squares. | decimal | 1, 2, 3, 4, and so on. | lower-roman | i, ii, iii, iv, and so on. | upper-roman | I, II, III, IV, and so on. | lower-alpha | a, b, c, d, and so on. | upper-alpha | A, B, C, D, and so on. | none | No marker is shown. |
|
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
disc. 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 liststyletype property determines the appearance of the list-item marker if the value of the list-style-image attribute is set to none, or if the image pointed to by the url cannot be displayed.
the liststyletype 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.
if the left margin of a line 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-type attribute and the listStyleType property to set the markers.
This example uses ul as a selector in an embedded (global) style sheet to change the marker type to circle.
<STYLE>
UL { list-style-type:circle }
</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 marker type on when an onmouseover event occurs.
<ul onmouseover="this.style.liststyletype='circle'">
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