Http://blog.funya.in/csscss3/ie6-fixed-bug/
Position: fixed; in IE6: Fixed browser Headers
. Fixed_top {position: fixed; top: 0px;} * HTML. fixed_top/* IE6 head fixed */{position: absolute; bottom: auto; top: expression(eval(document.doc umentelement. scrolltop ));} |
Fixed at the bottom of the browser
. Fixed_bottom {position: fixed; bottom: 0px;} * HTML. fixed_bottom/* fixed at the bottom of IE6 */{position: absolute; bottom: auto; top: expression(eval(document.documentelement.scrolltop+document.doc umentelement. clientHeight-this.offsetHeight-(parseint (this. currentstyle. margintop, 10) | 0)-(parseint (this. currentstyle. marginbottom, 10) | 0 )));} |
The two pieces of code can only be implemented at the bottom or at the top, and can be used with margin to control the position of the element.
There are two more, fixed on the left and fixed on the right.
. Fixed_left {position: fixed; Right: auto; left: 0px;} * HTML. fixed_left/* fixed on the left side of IE6 */{position: absolute; Right: auto; left: expression(eval(document.doc umentelement. scrollleft ));}. fixed_right {position: fixed; Right: 0px; left: auto;} * HTML. fixed_right/* fixed to the right of IE6 */{position: absolute; Right: auto; left: expression(eval(document.documentelement.scrollleft;document.doc umentelement. clientWidth-this.offsetWidth)-(parseint (this. currentstyle. marginleft, 10) | 0)-(parseint (this. currentstyle. marginright, 10) | 0 ));} |
Solution to IE6 Jitter
When Page scrolling is implemented, fixed positioning elements flash in IE6.
Solution:
* html,* html body {background-image:url(about:blank);background-attachment:fixed;} |
Or
.* html,* html body { _text-overflow:ellipsis; } |
Solve the bug that IE6 does not support position: Fixed fixed positioning (reprinted fan duck)