<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. 【量化】docker

    查看docker docker ps docker ps -a 删除docker docker stop 8809752ca95a docker rm 8809752ca95a 打包fly cd ~/ ...

  2. 【C#学习笔记】数组使用

    using System; namespace ConsoleApplication { class Program { static void Main(string[] args) { //int ...

  3. ORACLE 分区

    在建设数据仓库过程中,经常会有大量数据,短时间内表中数据量有限,查询性能还可以,但随着时间的延长,表中数据量迅速增加,查询速度就会变慢,性能下降,这时就要考虑对表进行分区. 一.oracle的分区 当 ...

  4. HDFS命令行文件操作

    Hadoop文件操作命令形式为 hadoop fs -cmd <args> 说明:cmd是具体的文件操作命令,<args>是一组数目可变的参数. Hadoop最常用的文件操作命 ...

  5. 【Sass初级】开始使用Sass和Compass

    转自:http://www.w3cplus.com/preprocessor/beginner/getting-started-with-sass-and-compass.html 如果你的朋友.同事 ...

  6. ArcGIS Engine 捕捉

    原文 ArcGIS Engine 捕捉 bool bCreateElement = true; ;//时间间隔 ;//初始值 IElement m_element = null; //界面绘制点元素 ...

  7. linux中清除cache的方法

    在进行测试文件导入的时候,发现内存占用很大,如下所示: [root@python ~]# vmstat 1 -S M 3 procs -----------memory---------- ---sw ...

  8. 【LeetCode】7 & 8 - Reverse Integer & String to Integer (atoi)

    7 - Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Notic ...

  9. 【转】requirejs简单入门

    博主今天正式工作啦,工作中用到了js模块化技术,这里转来一个入门教程,很易懂,转给同样刚入门的你们~~ 原地址:http://www.ruanyifeng.com/blog/2012/11/requi ...

  10. Chapter6:函数

    执行函数的第一步是(隐式地)定义并初始化它的形参.所以,函数最外层作用域中的局部变量也不能使用与函数形参一样的名字. 局部静态变量:在程序的执行路径第一次经过对象定义语句时初始化,并且直到程序终止才被 ...