一个坚向移动效果

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<!-- Author: Hutia -->
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>WU XIN</title>
<script type="text/javascript">
/*  Author: Hutia  */
function chkScroll(obj){
var y0=obj.offsetTop, y=event.y, h0=obj.offsetHeight, h1=obj.scrollHeight;
obj.scrollTop=parseInt((y-y0)/h0*(h1-h0));
}
</script>
<style>
* { margin:0px; padding:0px; }

#main { height:198px; width:66px; overflow:hidden; }

.i1 { width:64px; border:0px none #888; margin:0px; }

.a0 { filter:Gray() Alpha(Opacity=40); display:block; height:64px; width:64px; }
.a0:hover, .a0:active { filter:Alpha(Opacity=100); display:block; height:64px; width:64px; }
.a1 { border:1px solid #999; } .a1:hover { border:1px solid gold;}
.a2 { border:1px solid #999; } .a2:hover { border:1px solid green; }
.a3 { border:1px solid #999; } .a3:hover { border:1px solid blue;}
.a4 { border:1px solid #999; } .a4:hover { border:1px solid red;}
.a5 { border:1px solid #999; } .a5:hover { border:1px solid silver;}
.a6 { border:1px solid #999; } .a6:hover { border:1px solid black;}
.a7 { border:1px solid #999; } .a7:hover { border:1px solid #FEE;}
</style>
</head>
<body>
<div id="main" οnmοusemοve="chkScroll(this);">
<a href="#" class="a0 a1">
<img src="/articleimg/2006/06/3619/01.jpg" class="i1" /></a>
<a href="#" class="a0 a2">
<img src="/articleimg/2006/06/3619/02.jpg" class="i1" /></a>
<a href="#" class="a0 a3">
<img src="/articleimg/2006/06/3619/03.jpg" class="i1" /></a>
<a href="#" class="a0 a4">
<img src="/articleimg/2006/06/3619/04.jpg" class="i1" /></a>
<a href="#" class="a0 a5">
<img src="/articleimg/2006/06/3619/05.jpg" class="i1" /></a>
<a href="#" class="a0 a6">
<img src="/articleimg/2006/06/3619/06.jpg" class="i1" /></a>
<a href="#" class="a0 a7">
<img src="/articleimg/2006/06/3619/07.jpg" class="i1" /></a>
</div>
</body>
</html> 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值