7、列表屬性: 這里的屬性用來描述列表(list)的一系列屬性。
list-style-type屬性描述用于列表每一項前使用的符號: 屬性名稱: 'list-style-type' 屬性值: disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none 初始值: disc 適合對象: 列表元素 是否繼承: yes 百分比備注: 被禁止 屬性值含義為: disc:圓餅形。 circle:空心圓形。 square:方形。 decimal:十進制數值。 lower-roman:小寫羅馬數字。 upper-roman:大寫羅馬數字。 lower-alpha:小寫希臘字母。 upper-alpha:大寫希臘字母。 例如: <STYLE> OL { list-style-type: lower-roman } </STYLE> <BODY> <OL> <LI> This is the first item. <LI> This is the second item. <LI> This is the third item. </OL> </BODY> 還可以利用list-style-image把列表前面的符號換為圖形: 屬性名稱: 'list-style-image' 屬性值: <url> | none 初始值: none 適合對象: 列表元素 是否繼承: yes 百分比備注: 被禁止 <url>可以是絕對地址,也可以是相對地址。
list-style-position屬性用于描述列表的位置顯示: 屬性名稱: 'list-style-position' 屬性值: inside | outside 初始值: outside 適合對象: 列表元素 是否繼承: yes 百分比備注: 被禁止 屬性值outside和inside分別表示在BOX外部顯示或內部顯示,例如: <STYLE type="text/css"> UL { list-style: outside } UL.compact { list-style: inside }</STYLE><UL> <LI>first list item comes first <LI>second list item comes second </UL> <UL class=compact> <LI>first list item comes first <LI>second list item comes second </UL> list-style屬性為以上屬性的快捷方式: 屬性名稱: 'list-style' 屬性值: <'list-style-type'> || <'list-style-position'> || <'list-style-image'> 初始值: no 適合對象: 列表元素 是否繼承: yes 百分比備注: 被禁止 例如: UL { list-style: upper-roman inside }/* 對任何UL有效*/ UL ~ UL { list-style: circle outside } /* 對任何UL內部的UL標記有效*/
|