浮动层-JS兼容IE6
2013-12-23 11:17
183 查看
//引用jquery 包 /*orderBycat 与 orderBycatHead 双层浮动*/ $(window).scroll(function () { var top = $(window).scrollTop(); var topDiff = top; if (top >= 350) { if ($.browser.msie && ($.browser.version == "6.0")) { $("#orderBycat").addClass("rightFloatRight"); $("#orderBycatHead").addClass("rightFloatRight"); //预定菜单车 document.getElementById("orderBycat").style.top = topDiff;//菜单栏 document.getElementById("orderBycatHead").style.top = topDiff; /*如果固定在大层中,则不需要用 下列定位*/ document.getElementById("orderBycatHead").style.left = "99px"; document.getElementById("orderBycat").style.right = "247px"; } else { $("#orderBycat").addClass("fix_top"); $("#orderBycatHead").addClass("fix_top"); } } else { $("#orderBycat").removeClass("fix_top"); $("#orderBycat").removeClass("rightFloatRight"); $("#orderBycatHead").removeClass("fix_top"); $("#orderBycatHead").removeClass("rightFloatRight"); } });
/*去除IE下抖动*/ *html{background-image:url(about:blank);background-attachment:fixed;} /*浮动*/ .rightFloatRight { position: absolute; top: 0; /*_position:absolute; left:80px;*/ /*_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight)-610+"px");*/ } .fix_top { bottom: auto; position: fixed; top: 0; z-index: 10000; /*_position:absolute; _left:500px; _top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight)-450+"px");*/ }
相关文章推荐
- js获取两个日期之间间隔的天数。兼容IE6、7、8、9,Firefox,Chrome
- Jquery右下角抖动、浮动 实例代码(兼容ie6、FF)
- 属性操作-浮动cssFloat(兼容IE6、7、8)
- IE6下使用jquery.bgiframe.js插件解决下拉框覆盖浮动层、Dialog的问题
- IE6、IE7、IE8的CSS、JS兼容
- JS 兼容 IE6 IE8 FireFox 的 极稳定版 添加到收藏夹脚本
- 利用float制作兼容ie6纯css下来菜单,无table、无js
- 自写图片遮罩层放大功能jquery插件源代码,photobox.js 1.0版,不兼容IE6
- JS图片上传预览插件制作(兼容到IE6)
- 兼容多浏览器的JS 浮动广告[推荐]
- js实现兼容IE6与IE7的DIV高度
- DIV清除浮动 高度自适应 兼容IE6
- 返回顶部JS(完美兼容IE6)
- CSS实现浮动层跟随滚动条特效(兼容IE6)
- js控制图片大小的解决办法 非常实用哦,兼容ie6
- [JS] - 关闭网页[兼容IE6,IE7,IE8,FF,Chrome]
- js实现连续英文字符自动换行兼容ie6 ie7和firefox
- 网页浮动小窗口拖动功能【兼容火狐和ie6 测试通过】
- IE6、IE7、IE8的CSS、JS兼容
- 浮动广告-兼容ie6,ie7,firefox2,3