網頁中浮動圖片的實現

          <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 閱讀(667) 評論(0)  編輯  收藏


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


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

          導航

          統計

          常用鏈接

          留言簿(2)

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 武夷山市| 司法| 临沂市| 昌黎县| 唐海县| 枣阳市| 林西县| 峨眉山市| 永清县| 婺源县| 申扎县| 汽车| 河东区| 马边| 禹州市| 灵宝市| 年辖:市辖区| 靖宇县| 方山县| 二手房| 潞西市| 招远市| 长垣县| 宝丰县| 延寿县| 凤翔县| 枝江市| 视频| 县级市| 清流县| 屏东市| 玉山县| 甘德县| 沂源县| 大姚县| 邳州市| 新乡县| 辰溪县| 嘉峪关市| 扶余县| 涟水县|