我需要一次显示两个列表项并自动滚动以每秒查看所有项n
。
我看到很多复杂的照片滑块插件,但是简单的文本呢?
这是一个小提琴:http: //jsfiddle.net/B9DsX/
HTML
<ul>
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Praesent commodo nisi eu sapien</li>
<li>Fusce tempor, sapien vitae tempus dapibus</li>
<li>Aenean pulvinar urna vel tortor</li>
<li>Proin turpis tellus, fringilla eget molestie nec</li>
<li>Etiam sed varius lacus</li>
<li>Aenean facilisis tincidunt massa luctus feugiat</li>
<li>Etiam suscipit vel erat sit amet fringilla</li>
<li>Nulla sit amet eros mauris.</li>
</ul>
CSS
ul {
overflow-y: hidden;
overflow-x: scroll;
white-space: nowrap;
padding:30px 0;
margin:0;
}
li {
display:inline;
border:1px solid #ccc;
padding:10px;
margin:10px;
list-style-type:none;
}