仿线性翻转图片效果(适合广告展示)

<STYLE type=text/css>
DIV {FILTER: revealTrans(transition=4,duration=2); VISIBILITY: visible; WIDTH: 760px; POSITION: absolute}
</STYLE>

<body onload=p()>
<DIV id=jx1 onmouseover=s(1) onmouseout=s(0) align=center>
<table width="600" border="0" cellspacing="6" cellpadding="4">
  <tr>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/blueieda.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/flashempire.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/chinavisual.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/macromedia.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/windstudio.gif" width="88" height="31"></td>
  </tr>
</table>
</DIV>
<DIV id=jx2 onmouseover=s(1) style="VISIBILITY: hidden" onmouseout=s(0) align=center>
<table width="600" border="0" cellspacing="6" cellpadding="4">
  <tr>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/learnit.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/minethink.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/yy-s.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/coolboysky.gif" width="88" height="31"></td>
  </tr>
</table>
</DIV>
<DIV id=jx3 onmouseover=s(1) style="VISIBILITY: hidden" onmouseout=s(0) align=center>
<table width="600" border="0" cellspacing="6" cellpadding="4">
  <tr>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/jeedan.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/cnjx.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/snowolf21.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/genyi.gif" width="88" height="31"></td>
    <td width="113" align="center"><img src="http://www.it365cn.com/images/logo/17zm.gif" width="88" height="31"></td>
  </tr>
</table>
</DIV>
<SCRIPT>
var jx1=document.getElementById("jx1");var jx2=document.getElementById("jx2");var jx3=document.getElementById("jx3");
//设置显示哪个层的变量
var sL=1;
//设置动与不动的变量
var iS=0;
//设定显示时间
function p()
{

    if(iS==0)
    {
        if(sL==1)
        {
            cs1(jx1,1);
            cs1(jx2,0);
            cs1(jx3,0);
            setTimeout('p()',4000);
        }
        else if(sL==2){
            cs1(jx1,0);
            cs1(jx2,1);
            cs1(jx3,0);
            setTimeout('p()',4000);
        }
        else{
           
            cs1(jx1,0);
            cs1(jx2,0);
            cs1(jx3,1);
            setTimeout('p()',4000);           
        }       
        sL++;
        if(sL==4) sL=1;
    }
    else
        {
         setTimeout('p()',2000);
          }

}
//显示函数
function cs1(a,b)
{if(a==null)return;
 a.filters.revealTrans.apply();
 if(b==1) a.style.visibility="visible";
 else a.style.visibility="hidden";
 a.filters.revealTrans.play();}
//设定is变量
function s(v)
{iS=v;}
</SCRIPT>

posted @ 2006-03-30 16:23  MaxIE  阅读(592)  评论(1编辑  收藏  举报