zoukankan      html  css  js  c++  java
  • js缓冲效果原理

    <!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=utf-8" />
    <title>js缓冲效果原理</title>
    </head>
    
    <body>
    <div id="num">
    </div>
    <div id="ad" style="position:absolute;80px;height:100px;background:#0CC;"></div>
    <script type="text/javascript">
    var k=0;
    function change(){
    	h=Math.ceil(0.1*(100-k));
    	k=k+h;
    	document.getElementById("num").innerHTML=k;
    	document.getElementById("ad").style.top=k+"px";
    }
    setInterval(change,100);
    </script>
    </body>
    </html>
    
  • 相关阅读:
    Stupid Tower Defense
    Lifting the Stone
    城市地平线
    BestCoder Sequence
    Miaomiao's Geometry
    Rating
    Turn the pokers
    Peter's Hobby
    HTTP关键词收集
    HTTP出现前的协议
  • 原文地址:https://www.cnblogs.com/asqq/p/2459656.html
Copyright © 2011-2022 走看看