解决ie6不支持position: fixed;导致无法滚动的办法
<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;导致无法滚动的办法的更多相关文章
- 解决IE6不支持position:fixed属性
最近在优化网站浮动广告时候遇见了IE6不支持position:fixed属性.上网收集了一下解决方案 比较好的方案就是利用css表达式进行解决 补充:CSS Expression (CSS 表达式), ...
- 解决IE6不支持position:fixed;的问题
在网页设计中,时常要用到把某个元素始终定位在屏幕上,即使滚动浏览器窗口也不会发生变化. 一般我们会使用position:fixed来进行绝对固定,但IE6并不支持position:fixed属性,所以 ...
- 完美解决IE6不支持position:fixed的bug
示例代码: <!DOCTYPE html><html><head><meta http-equiv="Content-Type" cont ...
- js完美解决IE6不支持position:fixed的bug
详细内容请点击 <!DOCTYPE html><html><head><meta http-equiv="Content-Type" co ...
- 解决IE6不支持position:fixed的bug
/*完整代码 */ /* 除IE6浏览器的通用方法 */ .ie6fixedTL { position: fixed; left:; top:; } .ie6fixedBR { position: f ...
- IE6不支持position:fixed的解决方法
解决IE6不支持position:fixed的方法,非常简单,具体调用请参考下面: /*让position:fixed在IE6下可用! */ .fixed-top /* 头部固定 */{positio ...
- 解决IE6浏览器下position:fixed固定定位问题
像你所遇到的问题一样, IE6浏览器有太多的bug让制作网页的人头疼.这篇文章介绍的是介绍的是如何解决IE6不支持position:fixed;属性的办法.如果我们需要做某个元素始终位于浏览器的底部, ...
- 修正IE6不支持position:fixed的bug(转)
众所周知IE6不支持position:fixed,这个bug与IE6的双倍margin和不支持PNG透明等bug一样臭名昭著.前些天我做自己的博客模板的时候,遇到了这个问题.当时就简单的无视了IE6— ...
- 让IE6也支持position:fixed
众所周知IE6不支持position:fixed,这个bug与IE6的双倍margin和不支持PNG透明等bug一样臭名昭著.前些天遇到了这个问题.当时就简单的无视了IE6,但是对于大项目或商业网站, ...
随机推荐
- Qt 控制watchdog app hacking
/************************************************************************** * Qt 控制watchdog app hack ...
- 用 Xcode 开发 Cydia Substrate 插件(二)
上次介绍了一个如何用 Xcode 来构建 Substrate 插件,但是开发的具体过程还没有涉及,而这往往又正是初学者最难下手的地方,所以有了本文的后续. 不过在开始之前你要先做好思想准备,相比较开发 ...
- dede 5.7进后台卡死解决办法
注释后台文件dede/templets/index_body.htm(大概在第18行) <script type="text/javascript"> function ...
- MySQL存储过程中的3种循环
在MySQL存储过程的语句中有三个标准的循环方式:WHILE循环,LOOP循环以及REPEAT循环.还有一种非标准的循环方式:GOTO,不过这种循环方式最好别用,很容易引起程序的混乱,在这里就不错具体 ...
- js细节
1.小心函数中的“s“ getElementsByTagName:得到的是数组 getElementById:得到的是对象 2.js 中设置哪一项被选中 subject.selectedIndex = ...
- AE+C# 向axPageLayoutControl1添加图例
原文 AE+C# 向axPageLayoutControl1添加图例 //Get the GraphicsContainer IGraphicsContainer graphicsContainer ...
- ppt打不出中文
1. 安装微软输入法2007就可以解决了 这个是微软的一个bug,在powerpoint 2007里面如果监测到你的注册表里面没有微软拼音输入法2007的话,就不能够打出中文. 2. 如果你不想安装微 ...
- 15stl模板
1.stack #include<iostream> #include<stdio.h> #include<stack> using namespace std; ...
- C#语言基础02
字符串:string s="ab";string s1="a\nb";//n:newline或者next的意思. string s="a\\b&quo ...
- android 使用虚拟机安装apk(图文教程)(转)
1.启动虚拟机 2.我的android sdk在“E:\android\android开发环境\android SDK\platform-tools”把要安装的apk复制到这个根目录(和adb.exe ...