<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-51  評論-14  文章-0  trackbacks-0
    <!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" lang="en" xml:lang="en"> 
    <head>
    <title>關(guān)閉/展開</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <meta http-equiv="imagetoolbar" content="no" />
    <style type="text/css" media="screen">
    *,html{
    margin:
    0;
    padding:
    0;
    }
    body {
    text
    -align: center;
    margin: 
    0 auto;
    padding: 
    0;
    height: 
    100%;
    color: #0369cb;
    font: 
    76%/1.6em 宋體,Verdana,Tahoma,Arial,sans-serif;
    background
    -color: #efefef; 
    }
    #container {
    width: 800px;
    margin: 
    0 auto;
    padding: 
    0;
    text
    -align: center;
    margin
    -top: 6px;
    margin
    -bottom: 16px;
    }
    #container a{
    position:relative;
    text
    -decoration: none;
    bottom:0px;
    width:
    99.9%;
    }
    #container a:hover {
    color: #
    000000;
    text
    -decoration: none;
    }
    #box {
    display: none;
    width: 
    99.9%;
    height:1px;
    overflow:hidden;
    border: 1px solid #FFF;
    background: #
    000000 url(bg.gif) top left repeat;
    filter:alpha(opacity
    =2);
    }
    </style>
    <script type="text/javascript" language="javascript">

    var timer 
    = 10;   //計(jì)時(shí)器時(shí)鐘
    var HeightEnd=400;//Div高度
    var aNum = 20;   //步進(jìn)速度
    var isOpen = false;//層狀態(tài) 打開還是關(guān)閉 默認(rèn)關(guān)閉
    function $(name){return document.getElementById(name);}
    function voids() {
    setTimeout(
    "extend()",66);
    }


    // 展開/關(guān)閉
    function extend(){
    var tHeight 
    = parseInt(gs($("box"),"height"));
    if(!isOpen){
       $(
    "box").style.display="block";
       
    if (tHeight<HeightEnd){
        $(
    "box").style.height=(tHeight+aNum)+"px";
        $(
    "box").filters.alpha.opacity+=3;
        setTimeout(
    "extend()",timer);
       }
    else{
        isOpen
    =true//打開狀態(tài)
        $("tabTop").innerHTML = "關(guān)閉";
        $(
    "box").filters.alpha.opacity=100;
       }
    }
    else{
       
    if((tHeight-aNum)>0){
        $(
    "box").style.height=(tHeight-aNum)+"px";
        $(
    "box").filters.alpha.opacity-=5;
        setTimeout(
    "extend()",timer);
       }
    else{
        isOpen
    =false//關(guān)閉狀態(tài)
        $("box").style.display="none";
        $(
    "tabTop").innerHTML = "展開";
        $(
    "box").filters.alpha.opacity=2;
       }
    }
    }

    function gs(d,a){
    if (d.currentStyle){ 
        var curVal
    =d.currentStyle[a]
    }
    else
        var curVal
    =document.defaultView.getComputedStyle(d, null)[a]

    return curVal;
    }
    </script>
    </head>
    <body>
    <div id="container">
    <div id="box">
       測試..測試.
    <br><br> 
       
    <p>再次測試..</p>
       
    <p>測試下拉效果</p>
    </div>
    <a id="tabTop" onfocus="this.blur();" href="javascript:voids('box');">展開</a>
    </div>
    </body>
    </html>
    posted on 2008-06-10 18:05 Hank1026 閱讀(1673) 評論(1)  編輯  收藏

    評論:
    # re: div 緩慢下拉效果 2013-11-13 15:49 | clinton
    可以貼個(gè)展示效果的鏈接,只有自己復(fù)制來測試了  回復(fù)  更多評論
      

    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
    博客園   IT新聞   Chat2DB   C++博客   博問  
     
    主站蜘蛛池模板: 91视频免费观看| 香港特级三A毛片免费观看| 毛片在线全部免费观看| 亚洲一区二区三区无码影院| 偷自拍亚洲视频在线观看| 白白国产永久免费视频| 亚洲人精品亚洲人成在线| 国拍在线精品视频免费观看| 亚洲精品第五页中文字幕| 亚洲精品在线免费观看| 亚洲资源最新版在线观看| 无码av免费毛片一区二区 | 国产亚洲精品自在久久 | 1000部免费啪啪十八未年禁止观看 | 国产在亚洲线视频观看| 亚洲不卡AV影片在线播放| 国产99久久久国产精免费 | 曰批全过程免费视频在线观看 | 亚洲日本久久一区二区va| 全免费a级毛片免费**视频| 美女裸免费观看网站| 国产成人精品亚洲精品| 久久成人免费播放网站| 亚洲午夜电影在线观看高清 | 亚洲热线99精品视频| 日韩精品人妻系列无码专区免费 | 亚洲国产精品日韩| 免费播放在线日本感人片| 亚洲性无码av在线| 国产精品二区三区免费播放心 | 老外毛片免费视频播放| 亚洲成AV人片在线观看ww| 亚洲欧洲国产精品香蕉网| 中文精品人人永久免费 | 免费看小12萝裸体视频国产 | 18禁无遮挡无码国产免费网站| 久久亚洲精品专区蓝色区| 少妇亚洲免费精品| 蜜臀AV免费一区二区三区| 亚洲AV无码资源在线观看| 亚洲AV永久青草无码精品|