文字滚动JS

<style type="text/css">
/*20100716 */
.commentnew dl dd.recruit{width:200px;float: left; text-align: left; margin-left: 15px; display:inline; border:1px solid #C1AE9E; padding:1px;}
.commentnew dl dd.recruit h5{background:#E0DBD3; color:#47381C; font-size:12px; height:24px; line-height:24px; padding-left:10px;}

.commentnew dl dd.recruit ul{padding:0; margin:10px 5px; height:252px; overflow:hidden; width:auto; float:none;}
.commentnew dl dd.recruit ul li{list-style:none;  left 7px no-repeat; margin-left:5px; padding-left:12px; margin-bottom:6px; height:36px; overflow:hidden;}

.commentnew dl dd ul{width:474px; float:left; margin:0; padding:0 0 10px 0;}
.commentnew dl dd ul li.left{width:70px; margin:0 0 0 12px; display:inline; padding:0; float:left;text-align:left;  line-height:18px; }
*+html .commentnew dl dd ul li.left{line-height:20px;}
*html .commentnew dl dd ul li.left{line-height:20px;}
.commentnew dl dd ul li.lefttop{width:70px; margin:0 0 0 12px; display:inline; float:left;padding:5px 0; }
.commentnew dl dd ul li.right{width:380px; margin:0; padding:0 12px 0 0; display:inline; float:left; text-align:left; line-height:18px;}
.commentnew dl dd ul li.right img.brow{float:left; padding:0px 4px;}
.commentnew dl dd ul li.right .textarea{width:378px; float:left; height:150px; border:1px solid #c3c3c3; padding:3px; margin:0; vertical-align:top;}
.commentnew dl dd ul li.right .input{width:120px; float:left; height:18px;line-height:18px;  border:1px solid #c3c3c3; padding:0 2px; margin:0; vertical-align:middle;}
.commentnew dl dd ul li.right span.left{width:auto;float:left; text-align:left;}
.commentnew dl dd ul li.right span.right{width:100px;float:right; text-align:right;}
.commentnew dl dd ul li.right span a{color:#f00}
.commentnew dl dd ul li.right span a.red:link, a.red:visited, a.red:hover, a.red:active{color:#f00}
.commentnew dl dd ul li.right em{color:#466bbb;font-style:noraml;}
.commentnew dl dd ul li.right a img.btn{padding:0 0 3px 0; width:68px; height:21px;}
.commentnew dl dd ul li.right .checkbox{padding:0; margin:0;vertical-align:middle; border:0;}
 </style>
<script type="text/javascript">
function startmarquee(lh, speed, delay, index) {
  var t;
  var p = false;
  var o = document.getElementById("marqueebox" + index);
  o.innerHTML += o.innerHTML;
  o.onmouseover = function () { p = true }
  o.onmouseout = function () { p = false }
  o.scrollTop = 0;
  function start() {
  t = setInterval(scrolling, speed);
  if (!p) o.scrollTop += 2;
}
function scrolling() {
  if (o.scrollTop % lh != 0) {
    o.scrollTop += 2;
    if (o.scrollTop >= o.scrollHeight / 2) o.scrollTop = 0;
    } else {
      clearInterval(t);
      setTimeout(start, delay);
    }
  }
  setTimeout(start, delay);
}
function addEventHandler(target, type, func) {
  if (target.addEventListener)
    target.addEventListener(type, func, false);
  else if (target.attachEvent)
    target.attachEvent("on" + type, func);
  else target["on" + type] = func;
}
addEventHandler(window, "load", function () {
startmarquee(42, 50, 3000, 0);
});
</script>
<div class="commentnew">
  <dl>
    <dd id="recommended" class="recruit">
      <h5>文字滚动!</h5>
      <ul id="marqueebox0">
        * aaaaaaaaaaaaa;<br>
        bbbbbbbbbbbbbb;<br>
        ccccccccccccccc;<br>
        dddddddddddddddd;<br>
        eeeeeeeeeeeeeeeee;<br>
        ffffffffffffffffff;<br>
        gggggggggggggggggg;<br>
        hhhhhhhhhhhhhhhhhhh;<br>
        iiiiiiiiiiiiiii;<br>
        jjjjjjjjjj;<br>
        kkkkkkkkkkkkkkkkkkkk;<br>
      </ul>
    </dd>
  </dl>
</div>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值