CSS中關於list-style屬性的使用詳解

來源:互聯網
上載者:User
list-style-type -- 定義列表樣式

取值:disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit

disc: 點

circle: 圓圈

square: 正方形

decimal: 數字

decimal-leading-zero: 十進位數,不足兩位的補齊前置0,例如: 01, 02, 03, ..., 98, 99

lower-roman: 小寫羅馬文字,例如: i, ii, iii, iv, v, ...

upper-roman: 大寫羅馬文字,例如: I, II, III, IV, V, ...

lower-greek: 小寫希臘字母,例如: α(alpha), β(beta), γ(gamma), ...

lower-latin: 小寫拉丁文,例如: a, b, c, ... z

upper-latin: 大寫拉丁文,例如: A, B, C, ... Z

armenian: 亞美尼亞數字

georgian: 喬治亞數字,例如: an, ban, gan, ..., he, tan, in, in-an, ...

lower-alpha: 小寫拉丁文,例如: a, b, c, ... z

upper-alpha: 大寫拉丁文,例如: A, B, C, ... Z

none: 無(取消所有的list樣式)

inherit:繼承

引用網址:http://www.dreamdu.com/css/property_list-style-type/

初始值: disc

繼承性: 是

適用於: 所有屬於list的元素

list,中文"列表"的意思.style,中文"樣式"的意思.type,中文"類型"的意思.

樣本

ul { list-style-type:disc;}ul#circle{ list-style-type:circle;}ul#square{ list-style-type:square;}ul#decimal{ list-style-type:decimal;}ul#decimal-leading-zero{ list-style-type:decimal-leading-zero;}ul#lower-roman{ list-style-type:lower-roman;}ul#upper-roman{ list-style-type:upper-roman;}ul#lower-greek{ list-style-type:lower-greek;}ul#lower-latin{ list-style-type:lower-latin;}ul#upper-latin{ list-style-type:upper-latin;}ul#armenian{ list-style-type:armenian;}ul#georgian{ list-style-type:georgian;}ul#lower-alpha{ list-style-type:lower-alpha;}ul#upper-alpha{ list-style-type:upper-alpha;}ul#none{ list-style-type:none;}ol { list-style-type:lower-roman;}
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.