js代码:
.infoShow{border:1px solid #000;overflow-y:auto;height:340px;}.infoShow ul{margin:0px;padding:0px;float:left;white-space: nowrap;overflow:hidden;}.infoShow ul li{float: left;text-align:left;list-style:none;display: inline;}
注意:主要是添加overflow-y:auto;white-space:nowrap;overflow:hidden
html代码:
<div class="infoShow" style="margin-top:5px;"><ul id="info"><!--<li><a href="#">sfafjd;afja;ffsafafsfadffasdfasfasfasdfasdf</a></li>--><!--<li>sfafjd;afja;fasdfadsfasfdasfasfdasfasdfasdfas</li>--></ul>
</div>