在css中定义li行高怎么不起作用?

来源:百度知道 编辑:UC知道 时间:2024/06/01 16:57:28
我准备在首页中显示几行新闻,用ul还是ol还是dl好?

<style type="text/css">
li{list-style:none;
height:30px;line-height:30px
width:960px;
color:#f90;}
li span{float:right;}
</style>
<ul>
<li><span>2008-12-31</span>新闻一 </li>
<li><span>2008-12-31</span>新闻二 </li>
<li><span>2008-12-31</span>新闻三 </li>
</ul>

<style type="text/css">
li{height:40px; line-height:40px}
</style>
<ul>
<li>新闻一
<li>新闻二
<li>新闻三
</ul>

<style type="text/css">
li{
margin:0;padding:0;
width:160px;height:30px;
list-style-type:none;
border-bottom:2px dotted #ccc;
}
</style>
<ul>
<li>新闻一 </li>
<li>新闻二 </li>
<li>新闻三 </li>
</ul>

<style type="text/css">