• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

CSS2参考之九(转贴)

发布: 2007-6-30 18:56 | 作者: admin | 来源: | 查看: 14次 | 进入软件测试论坛讨论

领测软件测试网 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标记有效*/

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网