zoukankan      html  css  js  c++  java
  • 漂浮广告(从上往下飘最后消失)

    代码
       <script type="text/javascript"> 
            
                
    var adtime = 100;   //时间
                var adheight =0;    //高度
                
                $(document).ready(
    function(){
                    addCount(); 
                    adtime
    =300;
                    setTimeout(
    "noneAds()",7000); //停留时间
                })
     
                
    function addCount() 
                { 
                    
    if(adtime>0) { 
                        adtime
    --
                        adheight 
    = adheight+5
                    }
    else { 
                        
    return
                    } 
                    
    if(adheight>415)  //高度 
                    { 
                        
    return
                    } 
                    document.getElementById(
    "ad01").style.display = ""
                    document.getElementById(
    "ad01").style.height = adheight+"px"
                    setTimeout(
    "addCount()",30); 
                } 
                
    var N = 415//高度 
                function noneAds() { 
                    
    if(adtime>0){ 
                        adtime
    --
                        N 
    = N-5
                    }
    else { 
                        
    return
                    } 
                    
    if(N<0){ 
                        document.getElementById(
    "ad01").style.display = "none"
                        
    return
                    } 
                    document.getElementById(
    "ad01").style.height = N+"px"
                    setTimeout(
    "noneAds()",30); 
                } 
            
    </script> 
  • 相关阅读:
    单元测试之Stub和Mock
    【爆牙齿】说说我期待中的苹果那块板子。
    【爆牙游记】黄山归来不看岳-翻山。
    【爆牙齿】微软的坟墓:Windows 7。(四)
    【爆牙齿】微软的坟墓:Windows 7。(二)
    【爆牙齿】微软的坟墓:Windows 7。(三)
    【爆牙齿】微软的坟墓:Windows 7。(一)
    【爆牙齿】微软的坟墓:Windows 7。(五)
    【爆牙游记】黄山归来不看岳-日出。
    过年照片集。
  • 原文地址:https://www.cnblogs.com/fanxianhua/p/1650665.html
Copyright © 2011-2022 走看看