網頁中浮動圖片的實現

          <div id="img" style="position:absolute;">
          <a ; target="_blank">
          <img src="http://www.freedown.net/logo.gif"; border="0"></a>
          </div>

          <SCRIPT LANGUAGE="JavaScript">
          <!--
          var xPos = 20;
          var yPos = document.body.clientHeight;
          var step = 1;
          var delay = 30;
          var height = 0;
          var Hoffset = 0;
          var Woffset = 0;
          var yon = 0;
          var xon = 0;
          var pause = true;
          var interval;
          img.style.top = yPos;
          function changePos() {
          width = document.body.clientWidth;
          height = document.body.clientHeight;
          Hoffset = img.offsetHeight;
          Woffset = img.offsetWidth;
          img.style.left = xPos + document.body.scrollLeft;
          img.style.top = yPos + document.body.scrollTop;
          if (yon) {
          yPos = yPos + step;
          }
          else {
          yPos = yPos - step;
          }
          if (yPos < 0) {
          yon = 1;
          yPos = 0;
          }
          if (yPos >= (height - Hoffset)) {
          yon = 0;
          yPos = (height - Hoffset);
          }
          if (xon) {
          xPos = xPos + step;
          }
          else {
          xPos = xPos - step;
          }
          if (xPos < 0) {
          xon = 1;
          xPos = 0;
          }
          if (xPos >= (width - Woffset)) {
          xon = 0;
          xPos = (width - Woffset);
          }
          }
          function www_helpor_net() {
          img.visibility = "visible";
          interval = setInterval('changePos()', delay);
          }
          www_helpor_net();
          //For more,visit:www.helpor.net
          -->
          </script>

          posted on 2008-07-29 17:20 chenkai 閱讀(677) 評論(0)  編輯  收藏


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


          網站導航:
           
          <2008年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導航

          統計

          常用鏈接

          留言簿(2)

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 博乐市| 龙州县| 五常市| 麻栗坡县| 台东县| 乳源| 霍邱县| 祁连县| 龙井市| 太保市| 开鲁县| 孝感市| 华宁县| 志丹县| 岗巴县| 克拉玛依市| 新和县| 浮山县| 嘉峪关市| 元朗区| 白水县| 沧州市| 深州市| 楚雄市| 汕尾市| 兰溪市| 吉林市| 施甸县| 青浦区| 乌恰县| 繁昌县| 绵阳市| 珲春市| 潼南县| 抚松县| 新龙县| 疏附县| 霍邱县| 中牟县| 贵港市| 麻栗坡县|