列表类型:list-style-type(例)
<html>
<head>
<style type="text/css">
ul.yuan { list-style-type:circle;}
ul.fang { list-style-type:square;}
ul.da { list-style-type:upper-roman;}
ul.xi { list-style-type:lower-alpha;}
</style>
</head>
<body>
<ul class="yuan">
<li>空心圆</li>
</ul>
<ul class="fang">
<li>实心方块</li>
</ul>
<ul class="da">
<li>大写罗马数字</li>
</ul>
<ul class="xi">
<li>小写希腊字母</li>
</ul>
</body>
</html>
显示结果:
css2的其他值:
none 无标记。
disc (默认)标记是实心圆。
decimal 标记是数字。
decimal-leading-zero 0开头的数字标记。(01, 02, 03, 等。)
lower-roman 小写罗马数字(i, ii, iii, iv, v, 等。)
upper-roman 大写罗马数字(I, II, III, IV, V, 等。)
lower-alpha 小写英文字母(a, b, c, d, e, 等。)
upper-alpha 大写英文字母(A, B, C, D, E, 等。)
lower-greek 小写希腊字母(alpha, beta, gamma, 等。)
lower-latin 小写拉丁字母(a, b, c, d, e, 等。)
upper-latin 大写拉丁字母(A, B, C, D, E, 等。)
hebrew 传统的希伯来编号方式
armenian 传统的亚美尼亚编号方式
georgian 传统的乔治亚编号方式(an, ban, gan, 等。)
cjk-ideographic 简单的表意数字
hiragana 标记是:a, i, u, e, o, ka, ki, 等。(日文片假名)
katakana 标记是:A, I, U, E, O, KA, KI, 等。(日文片假名)
hiragana-iroha 标记是:i, ro, ha, ni, ho, he, to, 等。(日文片假名)
katakana-iroha 标记是:I, RO, HA, NI, HO, HE, TO, 等。(日文片假名)
css2.1的其他值:
disc
circlesquare
decimal
decimal-leading-zero
lower-roman
upper-roman
lower-greek
lower-latin
upper-latin
armenian
georgian
none
inherit
list-style-position:(项目标记位置)
ul.aaa
{
<!--列表项目标记放置在文本以内,且环绕文本根据标记对齐。-->
list-style-position:inside;
<!--默认值。保持标记位于文本的左侧。列表项目标记放置在文本以外,且环绕文本不根据标记对齐。-->
list-style-position:outside;
}
list-style-image以及混合添加:
<!DOCTYPE html>
<html>
<head>
<title>list相关</title><meta charset="utf-8" />
<style type="text/css">
li {
letter-spacing:2px;
text-indent:-1px;
text-align:left;
}
a:link {
background-color:#add8e6;
text-decoration:none;
}
a:hover{
background-color:#fff05f;
}
a:active{
background-color:#add8e6;
text-decoration:underline;
}
ul.a{
list-style:
url('1.jpg');
outside;
}
ul.b{
list-style:
url('2.jpg');
inside;
}
ul.c{
list-style:
url('3.jpg');
}
</style>
</head>
<body>
<ul class="a">
<li>
<a href="http://www.qq.com">firfox</a>
</li>
</ul>
<ul class="b">
<li><a href="http://www.qq.com">google</a>
</li>
</ul>
<ul class="c">
<li>
<a href="http://www.qq.com">safari</a>
</li>
</ul>
</body>
</html>
显示结果: