首页 > IE6下,鼠标持续地转成加载状态

IE6下,鼠标持续地转成加载状态

IE6下,不加载样式.ui-widget-content, 或者注释掉 30 行(修改obj.style.left的那一行)就不会出现鼠标持续地转成加载状态。图片路径正确也会有同样的问题,因为不方便就没附上图片。 希望高手能指点一下,先谢谢了。

是重绘引起了图片的reload吗?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0033)http://localhost:8081/index.jhtml -->
<html xmlns="http://www.w3.org/1999/xhtml" slick-uniqueid="3">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<!-- --------------------------------------------------- -->
<!-- IE6下,不加载样式.ui-widget-content, 或者注释掉 30 行就不会出现鼠标持续地转成加载状态-->
<style>
/**/.ui-widget-content{border:1px solid #ddd;background:#eee url(test/images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x;color:#333}</style>

<div class="ui-widget-content " tabindex="-1" role="dialog" aria-labelledby="ui-id-1" id="autoMoveWindow" style="outline: 0px; z-index: 1002; position: absolute; height: auto; width: 300px; display: block; top: 472px; left: 1102px; border: 1px solid red">
</div>

  <script type="text/javascript">
  var x = 50, y = 60;
  var xin = true, yin = true;
  var step = 1;
  var delay = 20;

  var obj = document.getElementById("autoMoveWindow");

  function floatAD() {
      var L = T = 0;

      if (document.compatMode == "CSS1Compat") {
          var R = document.documentElement.clientWidth - obj.offsetWidth;
          var B = document.documentElement.clientHeight - obj.offsetHeight;
          obj.style.left = Math.random() * 100 + "px";
         // x + document.documentElement.scrollLeft + "px";
          //obj.style.top = y + document.documentElement.scrollTop + "px";
      } else {
         // var R = document.body.clientWidth - obj.offsetWidth
         //  var B = document.body.clientHeight - obj.offsetHeight
         //  obj.style.left = x + document.body.scrollLeft + "px"
         //  obj.style.top = y + document.body.scrollTop + "px"
      }
      x = x + step * (xin ? 1 : -1);
      if (x < L) { xin = true; x = L }
      if (x > R) { xin = false; x = R }

      y = y + step * (yin ? 1 : -1);
      if (y < T) { yin = true; y = T }
      if (y > B) { yin = false; y = B }
  }
  var itl = setInterval("floatAD()", delay);

  obj.onmouseover = function () { clearInterval(itl) }
  obj.onmouseout = function () { itl = setInterval("floatAD()", delay) } 

  </script>
</body></html>

没辙了,只好移除背景图片。至少能不让鼠标闪来闪去的。

【热门文章】
【热门文章】