有点像咱们现在CSDN这个页面这样(就是这个帖子顶上),先显示一个大图的广告,延时几秒或者收缩上去,然后重新显示一个小图。我想要的是像网易印象派那种(http://yxp.163.com/)

解决方案 »

  1.   

    咱们CSDN的效果这里可以看到http://topic.csdn.net/t/20050619/03/4091853.html但我说的是网易印象派这种:http://yxp.163.com/
      

  2.   

    jquery + div吧
    动画效果可以用jquery实现,放大缩小用div很简单,弄个setTimeout就可以
      

  3.   

    http://bbs.blueidea.com/viewthread.php?tid=2932364&page=1&authorid=498332
    看这个
      

  4.   

    <body onload="run();"><div id="box" style="width:900px;margin:0 auto;height:400px;background:#F39;"></div><script>
    cout = 400 ;
    function run(){

    var id = document.getElementById('box');
    id.style.height = cout +"px";
    cout -= 5 ;
    if(cout>100){
    setTimeout(function(){
    run();
    },10);
    }
    }
    </script>
      

  5.   

    写了下哦
    <!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" />
    <title>无标题文档</title>
    <style>
    body{}
    #big{ width:960px; margin:0px auto;}
    #aa{ overflow:hidden;height:408px;}
    #bb{ width:100%;height:500px; background:#CCCCCC;}
    </style>
    <script language="javascript">
    function hidden(){
    var a=408;
    var oheight=document.getElementById("aa");

    hide=function (){
    if(a>5){
    a-=5;
    oheight.style.height=a+"px";
    }
    else{
    clearInterval(b);
    show=function(){
    if(a<46){
    oheight.getElementsByTagName("img")[0].src="http://st2.yxp.126.net/img/index/n-p.jpg?v=5242929246100427";
    a+=1;
    oheight.style.height=a+"px";
    }
    else
    clearInterval(c);
    }
    var c=setInterval(show,25);
    }
    }
    var b=setInterval(hide,25);
    }
    </script>
    </head><body onload="hidden()">
    <div id="big">
    <div id="aa"><img src="http://st.yxp.126.net/img/index/b-n-p.jpg?v=5242929246100427"></div>
    <div id="bb"></div>
    </div>
    </body>
    </html>