等待-放飞梦想

勤现在-乐将来

如何使用list-style项目符号?

Await / 前端交互 / 2008/08/26 9:31 / 热度(2,478)

项目符号有多种,罗列如下:

  disc(实心圆点)、
  
circle(空心圆圈)、
  
square(实心方块)、
  
decimal(阿拉伯数字)、
  
lower-roman(小写罗马数字)、
  
upper-roman(大写罗马数字)、
  
lower-alpha(小写英文字母)、
  
upper-alpha(大写英文字母)、
  
none(无)。


比如设定一个列表(ul或ol)的项目符号为方块,如:

ul li{
list-style: square;
}

此外list-style还有一些值,比如可以采用一些小图片作为项目符号,在list-style下直接写url(“图片地址”)。注意如果一个项目列表的左外补丁(margin-left)为零,list-style-position: outside(默认是outside)的项目符号不会显示。

评论(1)

  1. Jeryyms
    2008/10/24

    Nice site you have

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Top 管理

无觅相关文章插件,快速提升流量