IE6 position:fixed bug hack方式】的更多相关文章

/* IE6浏览器的特有方法 */ /* 修正IE6振动bug */ * html,* html body{background-image:url(about:blank);background-attachment:fixed} * html .ie6fixedTL{position:absolute;left:expression(eval(document.documentElement.scrollLeft));top:expression(eval(document.document…
第一种:css方法 有时候当我们需要把一个元素固定在页面的某个部位,一般都是用css中的“position:fixed;”方法来解决,但是IE6不支持fixed,所以今天分享一个兼容IE6的页面底部固定层CSS代码.如下: .bottom{bottom:0;position:fixed;height:23px;line-height:23px;width:100%;z-index:999; _bottom:auto;_width:100%;_position:absolute; //_top:e…
关于 position:fixed; 属性 生成绝对定位的元素,相对于浏览器窗口进行定位. 元素的位置通过 “left”, “top”, “right” 以及 “bottom” 属性进行规定. position:fixed; 可以让网页上的某个元素固定在一个绝对的位置,即使拉动滚动条位置也不发生变化.(在 LOO2K 博客右下角的那个置顶的小按钮就是用了这个 CSS 属性实现的) 一般的 position:fixed; 实现方法 以我的博客为例,在右下角<div id="top"…
#e_float{ _position:absolute; _bottom:auto; _right:50%; _margin-right:-536px; _top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this…
示例代码: <!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>IE6 position:fixed bug</title><style>*{padding:0;margin:0}p{height:2000px}#gs{border…
详细内容请点击 <!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>IE6 position:fixed bug</title><style>*{padding:0;margin:0}p{height:2000px}#gs{bord…
众所周知IE6不支持position:fixed,这个bug与IE6的双倍margin和不支持PNG透明等bug一样臭名昭著.前些天我做自己的博客模板的时候,遇到了这个问题.当时就简单的无视了IE6——尽管有几个使用IE6的朋友,一起BS我……但是对于大项目或商业网站,如果有用到这个属性的时候,是不可能直接无视的. 你是如何让position:fixed在IE6中工作的? 本文所使用的技巧是用了一条Internet Explorer的CSS表达式(expression).你不可以直接使用该表达式…
IE6有诸多奇葩,不支持position:fixed就是当中之中的一个.所以在做一些比方固定在顶部或者底部或者固定元素的效果时须要考虑兼容IE6的这个问题.解决方式是用Ie6的hack. *html {/* 仅仅有IE6支持 */ background-image: url(about:blank); background-attachment: fixed; /* 固定背景 */ } #box { /* 非IE6浏览器使用固定元素 */ position: fixed; top: 0; lef…
/*完整代码 */ /* 除IE6浏览器的通用方法 */ .ie6fixedTL { position: fixed; left:; top:; } .ie6fixedBR { position: fixed; right:; bottom:; } /* IE6浏览器的特有方法 */ /* 修正IE6振动bug */ * html, * html body { background-image: url(about:blank); background-attachment: fixed; }…
最近在优化网站浮动广告时候遇见了IE6不支持position:fixed属性.上网收集了一下解决方案 比较好的方案就是利用css表达式进行解决 补充:CSS Expression (CSS 表达式),是一种使用动态设置 CSS 属性的方式,并且被 IE5 以上的版本所支持,但是 IE8 的标准模式已不再支持 CSS 表达式了 IE7和以上的浏览器都支持position:fixed: 之前写过一篇介绍过固定页脚的文字,那时候没在ie6下测试 方法一 <!--[if IE 6]> <styl…