日期:2014-05-16  浏览次数:20391 次

自动滚动一个li
我想在下面的代码实现固定时间滚动一个li 前后要衔接上,大家帮忙下
<div class="culturelist mainblack">
  <ul>
  <li><a href="#"><img src="images/culture001.jpg" width="112" height="84" />特色金牛</a></li>
  <li><a href="#"><img src="images/bxgsimg2.jpg" width="112" height="84" />特色金牛</a></li>
  <li><a href="#"><img src="images/bxgsimg3.jpg" width="112" height="84" />特色金牛</a></li>
  <li><a href="#"><img src="images/bxgsimg4.jpg" width="112" height="84" />特色金牛</a></li>
  <li><a href="#"><img src="images/bxgsimg5.jpg" width="112" height="84" />特色金牛</a></li>
  <li><a href="#"><img src="images/bxgsimg3.jpg" width="112" height="84" />特色金牛</a></li>
  <li><a href="#"><img src="images/bxgsimg4.jpg" width="112" height="84" />特色金牛</a></li>
  <li><a href="#"><img src="images/bxgsimg5.jpg" width="112" height="84" />特色金牛</a></li>
  </ul>
   
</div>

------解决方案--------------------
每次显示一个从下向上滚动
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">

.scrolltxt_con {display: inline-block;height: 80px;line-height: 50px;margin: 0 0 0 26px;overflow: hidden;}
.scrolltxt_con a:link, .scrolltxt_con a:visited {color: #ff4f00;}
</style>
</head>
<body>
<div class="scrolltxt_con" id="3gAdvert">
<ul>
<li><a href="#">特色金牛1</a></li>
<li><a href="#">特色金牛2</a></li>
<li><a href="#">特色金牛3</a></li>
<li><a href="#">特色金牛4</a></li>
<li><a href="#">特色金牛5</a></li>
<li><a href="#">特色金牛6</a></li>
<li><a href="#">特色金牛7</a></li>
<li><a href="#">特色金牛8</a></li>
</ul>

</div> 
</body>
</html>
<script language="javascript" type="text/javascript">
//系统消息滚动
var Class1 = {
create: function () {
return function () {
this.initialize.apply(this, arguments);
}
}
}
Function.prototype.bind = function (object) {
var method = this;
return function () {
method.apply(object, arguments);
}
}
var Scroll1 = Class1.create();
Scroll1.prototype = {
initialize: function (element, height) {
this.element = document.getElementById(element);
//alert(this.element.innerHTML)
this.element.innerHTML += this.element.innerHTML;
this.height = height;
this.maxHeight = this.element.scrollHeight / 2;
this.counter = 0;
this.scroll();
this.timer = &q