81,092
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>Neslein</title>
<style type="text/css">
img {
filter:Alpha(opacity=10);
opacity:0.1;
}
</style>
</head>
<body>
<img src="file:///C:/documents%20and%20settings/gongwe01/desktop/globe_east_2048.gif" onmouseover="ChangeOpacity(this)" />
<script type="text/javascript">
function animation(o, a, s, e, speed){
var sTime = +new Date(), p, speed = speed || 400;
var iTimer = setInterval(function(){
p = (+new Date() - sTime) / speed;
if(p >= 1){
o[a] = e;
return clearInterval(iTimer);
}
o[a] = s + (e - s) * ((-Math.cos(p * Math.PI) / 2) + 0.5);
}, 1);
}
function ChangeOpacity(o){
document.all ? animation(o.filters.alpha, 'opacity', 10, 100) : animation(o.style, 'opacity', 0.1, 1);
o.onmouseout = function(){
document.all ? animation(o.filters.alpha, 'opacity', 100, 10) : animation(o.style, 'opacity', 1, 0.1);
}
}
</script>
</body>
</html>