list-style-type:none;
}
B).如果你想将列表符换成图像,则:
list-style-type:none;
list-style-image: url(/blog/images/icon.gif);
}
C).为了左对齐,可以用如下代码:
list-style-type:none;
margin:0px;
}
D).如果想给列表加背景色,可以用如下代码:
list-style-type: none;
margin:0px;
}
ul li{
background:#CCC;
}
E).如果想给列表加MOUSEOVER背景变色效果,可以用如下代码:
ul li a{ display:block; width: 100%; background:#ccc; }
ul li a:hover{ background:#999; }
F).LI中的元素水平排列,关键FLOAT:LEFT:
list-style-type:none;
width:100%;
}
ul li{
width:80px;
float:left;
}
<html>
<head>
<style><!--
#table
{clear:none;width:300px;border-top:1px #000 solid;}
#table ul
{clear:left;margin:0px;padding:0px;width:301px;list-style-type:none;border-bottom:1px
#000 solid;border-left:1px #000 solid;}
#table li
{float:left;display:block;margin:0px;padding:0px;border-right:1px #000
solid;width:60px;}
--></style>
</head>
<body>
<div
id="table">
<ul>
<li>123</li>
<li>123</li>
<li>123</li>
<li>123</li>
<li>456</li>
</ul>
<ul>
<li>abc</li>
<li>abc</li>
<li>abc</li>
<li>abc</li>
<li>def</li>
</ul>
<ul> <li>ABC</li> <li>ABC</li> <li>ABC</li> <li>ABC</li> <li>DEF</li></ul><ul> <li>123</li> <li>123</li> <li>123</li> <li>123</li> <li>456</li></ul><ul> <li>abc</li> <li>abc</li> <li>abc</li> <li>abc</li> <li>def</li></ul><ul> <li>ABC</li> <li>ABC</li> <li>ABC</li> <li>ABC</li> <li>DEF</li></ul><ul> <li>123</li> <li>123</li> <li>123</li> <li>123</li> <li>456</li></ul><ul> <li>abc</li> <li>abc</li> <li>abc</li> <li>abc</li> <li>def</li>
</ul>
</div>
</body>
</html>