最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
CSS手册简编:列表属性
时间:2022-07-02 13:06:21 编辑:袖梨 来源:一聚教程网
CSS属性:
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:大写希腊字母。
例如:
还可以利用list-style-image把列表前面的符号换为图形:
属性名称: 'list-style-image'
属性值: | none
初始值: none
适合对象: 列表元素
是否继承: yes
百分比备注: 被禁止
可以是绝对地址,也可以是相对地址。
list-style-position属性用于描述列表的位置显示:
属性名称: 'list-style-position'
属性值: inside | outside
初始值: outside
适合对象: 列表元素
是否继承: yes
百分比备注: 被禁止
属性值outside和inside分别表示在BOX外部显示或内部显示,例如:
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标记有效*/
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:大写希腊字母。
例如:
- This is the first item.
- This is the second item.
- This is the third item.
还可以利用list-style-image把列表前面的符号换为图形:
属性名称: 'list-style-image'
属性值:
初始值: none
适合对象: 列表元素
是否继承: yes
百分比备注: 被禁止
list-style-position属性用于描述列表的位置显示:
属性名称: 'list-style-position'
属性值: inside | outside
初始值: outside
适合对象: 列表元素
是否继承: yes
百分比备注: 被禁止
属性值outside和inside分别表示在BOX外部显示或内部显示,例如:
- first list item comes first
- second list item comes second
- first list item comes first
- second list item comes second
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标记有效*/
相关文章
- 神探诡事录清城山怎么探索 08-24
- 星痕共鸣森语者天赋如何加点 08-24
- 梦想世界长风问剑录召唤巫法流如何搭配 08-24
- 永劫无间刘炼魂玉怎么选择 08-24
- 星塔旅人魔王怎么养成 08-24
- 大航海时代传说船只如何选择 08-24