三行代码搞定平滑的JS新闻单行滚动

<%@ page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>新闻滚动</title>
<style>
a{display:block;line-height:18px;text-decoration:none;color:#555;font-family:Arial;font-size:12px;}
.shell{
background:url(http://www.codefans.net/jscss/demoimg/200902/arrowb.gif) no-repeat 4px 5px;
border:1px solid #aaa;
width:230px;
padding:3px 2px 2px 26px;
}
#div1{
height:18px;
overflow:hidden;
}
</style>
</head>
<body>
<div class="shell">
<div id="div1">
<a href="javascript:">jQuery的图片滚动切换插件</a>
<a href="javascript:">Mootools slider 滚动条拖动取值的实现 </a>
<a href="javascript:">VB开发的Eclipse编程软件完整版</a>
<a href="javascript:">VC++生成随机数并快速排序的算法</a>
<a href="javascript:">VB语音报数计算器源程序</a>
</div>
<div>
</body>
<script>
var c,_=Function;
with(o=document.getElementById("div1")){ innerHTML+=innerHTML; οnmοuseοver=_("c=1"); οnmοuseοut=_("c=0");}
(F=_("if(#%18||!c)#++,#%=o.scrollHeight>>1;setTimeout(F,#%18?10:1500);".replace(/#/g,"o.scrollTop")))();
</script>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值