Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

list-style

这篇翻译不完整。请帮忙从英语翻译这篇文章

概要

CSS list-style 属性是设置list-style-type, list-style-image 和 list-style-position  的简写属性。

初始值as each of the properties of the shorthand:
适用元素list items
是否是继承属性yes
适用媒体visual
计算值as each of the properties of the shorthand:
是否适用于 CSS 动画
正规顺序order of appearance in the formal grammar of the values

语法

Formal syntax: <'list-style-type'> || <'list-style-position'> || <'list-style-image'>

以任何顺序接受一个,二个或者三个关键词

<'list-style-type'>
参看 list-style-type
<'list-style-image'>
参看 list-style-image
<'list-style-position'>
参看 list-style-position

示例

HTML

List 1
<ul class="one">
  <li>List Item1</li>
  <li>List Item2</li>
  <li>List Item3</li>
</ul>
List 2
<ul class="two">
  <li>List Item A</li>
  <li>List Item B</li>
  <li>List Item C</li>
</ul>

CSS

.one {
  list-style: circle;
}

.two {
  list-style: square inside;
}

Result

规范

规范 状态 注释
CSS Lists and Counters Module Level 3
list-style
Working Draft 没有改变
CSS Level 2 (Revision 1)
list-style
Recommendation 初始定义

浏览器兼容性

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 1.0 (1.7 or earlier) 4.0 7.0 1.0
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 1.0 1.0 (1) 6.0 6.0 1.0

另参见

文档标签和贡献者

 此页面的贡献者: SphinxKnight, Sebastianz, paddingme
 最后编辑者: SphinxKnight,