<div id="im" style="top: 100px; position: fixed; left: 5px; border: 3px solid #0066CC; padding: 3px; text-align: center; background: #ffffff;width:132px;">   34344135465465  </div>

-------------------------解决ie6不支持position: fixed;导致无法滚动的办法---------------------------------------

if (navigator.userAgent.indexOf("MSIE 6.0") > 0){

//鼠标滚动事件  var scrollFunc=function(e){//获取函数代码

e=e || window.event;//判断浏览器兼容哪个方法

if(e.wheelDelta){//IE/Opera/Chrome

//   alert("监听成功!");

// alert(document.documentElement.scrollTop);

}      else if(e.detail){//Firefox

//  alert("监听成功!");

// alert(document.documentElement.scrollTop);

}

//解决浏览器问题
     var count=document.documentElement.scrollTop+document.body.scrollTop;
     var newheight=parseInt(count)+parseInt(110);
    $("#im").attr("style","background-image:url('image/big_bg.png'); border:none; position:fixed; _position:absolute; z-index:99; margin-left:800px;   padding: 3px; text-align: center; width:200px;height: 150px;top:"+newheight+"px;");
 };
 /* /*注册事件*/
  if(document.addEventListener){
   //mousewheel OR DOMMouseScroll
 document.addEventListener('DOMMouseScroll',scrollFunc,false);//W3C
 // document.addEventListener('mousewheel',scrollFunc,false);//360
  }
 else{
 document.onmousewheel=scrollFunc; //IE/Opera/Chrome */
 }
 }

解决ie6不支持position: fixed;导致无法滚动的办法的更多相关文章

  1. 解决IE6不支持position:fixed属性

    最近在优化网站浮动广告时候遇见了IE6不支持position:fixed属性.上网收集了一下解决方案 比较好的方案就是利用css表达式进行解决 补充:CSS Expression (CSS 表达式), ...

  2. 解决IE6不支持position:fixed;的问题

    在网页设计中,时常要用到把某个元素始终定位在屏幕上,即使滚动浏览器窗口也不会发生变化. 一般我们会使用position:fixed来进行绝对固定,但IE6并不支持position:fixed属性,所以 ...

  3. 完美解决IE6不支持position:fixed的bug

    示例代码: <!DOCTYPE html><html><head><meta http-equiv="Content-Type" cont ...

  4. js完美解决IE6不支持position:fixed的bug

    详细内容请点击 <!DOCTYPE html><html><head><meta http-equiv="Content-Type" co ...

  5. 解决IE6不支持position:fixed的bug

    /*完整代码 */ /* 除IE6浏览器的通用方法 */ .ie6fixedTL { position: fixed; left:; top:; } .ie6fixedBR { position: f ...

  6. IE6不支持position:fixed的解决方法

    解决IE6不支持position:fixed的方法,非常简单,具体调用请参考下面: /*让position:fixed在IE6下可用! */ .fixed-top /* 头部固定 */{positio ...

  7. 解决IE6浏览器下position:fixed固定定位问题

    像你所遇到的问题一样, IE6浏览器有太多的bug让制作网页的人头疼.这篇文章介绍的是介绍的是如何解决IE6不支持position:fixed;属性的办法.如果我们需要做某个元素始终位于浏览器的底部, ...

  8. 修正IE6不支持position:fixed的bug(转)

    众所周知IE6不支持position:fixed,这个bug与IE6的双倍margin和不支持PNG透明等bug一样臭名昭著.前些天我做自己的博客模板的时候,遇到了这个问题.当时就简单的无视了IE6— ...

  9. 让IE6也支持position:fixed

    众所周知IE6不支持position:fixed,这个bug与IE6的双倍margin和不支持PNG透明等bug一样臭名昭著.前些天遇到了这个问题.当时就简单的无视了IE6,但是对于大项目或商业网站, ...

随机推荐

  1. Python [Leetcode 350]Intersection of Two Arrays II

    题目描述: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, ...

  2. Cython:基础教程(1) 语法

    1 变量定义 http://docs.cython.org/src/reference/language_basics.html http://blog.csdn.net/i2cbus/article ...

  3. ORACLE impdp 导入数据

    1 table_exists_action参数说明 使用imp进行数据导入时,若表已经存在,要先drop掉表,再进行导入. 而使用impdp完成数据库导入时,若表已经存在,有四种的处理方式: 1)  ...

  4. Intent七大属性

    一.Intent的作用是什么?    1.Intent 用于封装程序的”调用意图“.两个Activity之间,可以把需要交换的数据封装成Bundle对象,然后使用Intent携带Bundle对象,实现 ...

  5. Nginx实现多个站点使用一个端口(配置Nginx的虚拟主机)

    Nginx 是一个轻量级高性能的 Web 服务器, 并发处理能力强, 消耗资源小, 无论是静态服务器还是网站, Nginx 表现更加出色, 作为 Apache 的补充和替代使用率越来越高,目前很多大型 ...

  6. 嵌入式 Linux下编译并使用curl静态库

    #x86 ./configure --disable-shared --enable-static --disable-ftp --disable-ipv6 --disable-rtsp --disa ...

  7. CMake实践(4)

    一,本期目标: [sun@localhost t4]$ cat README 任务:如何使用外部共享库和文件 二,目录结构 [sun@localhost t4]$ tree ../t4../t4├── ...

  8. c# is和as的区别

    关于类型的判断和转换有is和as这2个操作符.具体区别和用法如下is就是处于对类型的判断.返回true和false.如果一个对象是某个类型或是其父类型的话就返回为true,否则的话就会返回为false ...

  9. js画线

    <body> <div id="main"> </div> <div id="fd" style="filt ...

  10. 性能测试指标&说明 [解释的灰常清楚哦!!]

    详见: 浅谈软件性能测试中关键指标的监控与分析 http://www.51testing.com/html/18/n-3549018.html