让横向排列的方法

方法总结:

内联 ,浮动


方法一:直接在<li>里面加样式来实现

<ul style=list-style:none;margin:0;>
<li style="display:inline">我要横向排列</li>
<li style="display:inline">Hier of chsfish </li>
</ul>

方法二:通过定义ul li 来实现

ul{list-style-type:none; margin:0;width:100%; } 
ul li{ width:80px; float:left;} 
<ul>
<li>我要横向排列</li>
<li>Hier of chsfish </li>
</ul>

posted @ 2016-06-29 19:58  千喜ya  阅读(311)  评论(0编辑  收藏  举报