goole动态图片导航

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<title>google 动态图片导航的实现|www.tc-21.com</title>
<style type="text/css">
body {text-align:center}
table {border:1px solid #eeeeee;padding:3px 0;border-bottom-width:5px}
.icon td {width:50px;height:37px;background-image:url(/ITCenter/UploadFiles_2217/200908/20090806123036601.gif);cursor:pointer;}
.capt td {font:normal 11px verdana;padding:2px 0}
.a {background-position-y:0px}
.b {background-position-y:-37px}
.c {background-position-y:-74px}
.d {background-position-y:-111px}
.e {background-position-y:-148px}
.f {background-position-y:-185px}
.g {background-position-y:-222px}
.f1 {background-position-x:0px}
.f2 {background-position-x:-51px}
.f3 {background-position-x:-101px}
.f4 {background-position-x:-153px}
.f5 {background-position-x:-205px}
.f6 {background-position-x:-257px}
.f7 {background-position-x:-309px}
</style>
<script language="javascript" type="text/javascript">
window.οnlοad=function(){
var tt=document.getElementsByTagName('table')[0];
var cs=tt.rows[1].cells,ct=tt.rows[0].cells;
for(var i=0;i<cs.length;i++)
    cssAni(cs[i],ct[i],7);
try
{
      document.execCommand("BackgroundImageCache",false,true)
}
catch(c)
{
}
}
function cssAni(osrc,otarget,num,duration){
var t=null,c=1,d=0,n=0,i=Math.floor((duration||300)/num);
var s=otarget.className.replace(/.$/,''),r=/over/;
osrc.οnmοuseοver=osrc.οnmοuseοut=otarget.οnmοuseοver=otarget.οnmοuseοut=function(e){
    n=r.test((e||event).type)?1:-1;
    if(!t) t=setInterval(function(){
      if (d!=n&&c!=1&&c!=num)
      {
        d=n;
      }
      if((c==1||c==num)&&((d==n||c+n<1)||!(d=n)))
          return clearInterval(t),t=null;
      otarget.className=s+(c+=d);
      //alert("i:"+i+" "+"s:"+s+" "+"c:"+c+" "+"d:"+d+" "+"n:"+n+" "+"r:"+r);
    },i);
};
}
</script>
</head>
<body>
<table>
<tr class='icon'>
    <td class='a f1'></td>
    <td class='b f1'></td>
    <td class='c f1'></td>
    <td class='d f1'></td>
    <td class='e f1'></td>
    <td class='f f1'></td>
    <td class='g f1'></td>
</tr>
<tr class='capt'>
    <td><a href='http://www.tc-21.com'>A</a></td>
    <td><a href='http://www.tc-21.com'>B</a></td>
    <td><a href='http://www.tc-21.com'>C</a></td>
    <td><a href='http://www.tc-21.com'>D</a></td>
    <td><a href='http://www.tc-21.com'>E</a></td>
    <td><a href='http://www.tc-21.com'>F</a></td>
    <td><a href='http://www.tc-21.com'>G</a></td>
</tr>
</table>
</body>
</html>
文章来自天诚世纪(www.tc-21.com) 详文参考:http://www.tc-21.com/ITCenter/200908/20090806122319.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值