解决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,但是对于大项目或商业网站, ...
随机推荐
- BZOJ 1935 园丁的烦恼
离线,BIT. #include<iostream> #include<cstdio> #include<cstring> #include<algorith ...
- ubuntu16.04 64位server安装php7
You can do the following: sudo apt-get install python-software-properties sudo LC_ALL=C.UTF-8 add-ap ...
- 【英语】Bingo口语笔记(78) - let系列
- 【转】XCode环境变量及路径设置 -- 待学习
原文网址:http://www.cnblogs.com/oc-bowen/p/5140541.html 一般我们在xcode里面配置包含工程目录下头文件的时候,都要关联着相对路径和绝对路径,如果只是自 ...
- redo和undo的区别
转摘:http://blog.163.com/jing_playboy/blog/static/757362222012520104521864/ redo--> undo-->dat ...
- Axis,axis2,Xfire以及cxf对比
http://ws.apache.org/axis/ http://axis.apache.org/axis2/java/core/ http://xfire.codehaus.org/ http:/ ...
- hdu 5254 水题
纯暴力就能过的,可是题目描述真心不清楚,我看了好久好久才明白题目啥意思. 为了迅速打完,代码比较冗余. /* * Author : ben */ #include <cstdio> #in ...
- 正则 提取html标签value
using System.Text.RegularExpressions; //step2: extract expected info //<h1 class="h1user&quo ...
- Thread .join 的用法一例
在使用身份证读卡器时,要求 1. 身份证读到身份证 就 停止线程. 2. 关闭界面时会 自动停止调用读身份证的线程.这时候就需要用到 Thead.join 例子如下: Thread thread; p ...
- Slideout吐槽
前言: 今天有点事,只尝试做一个侧边栏.SlideOut一个侧边栏,对着github,ReadMe看,并尝试着写了.还不错,关键是当与bootstrap一起时,什么效果都没了, 这是什么情况,明天想再 ...