Home  >  Article  >  Web Front-end  >  ie6, ie7, ie8 perfectly support position:fixed ultimate solution_Experience exchange

ie6, ie7, ie8 perfectly support position:fixed ultimate solution_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:03:411906browse

ie6 does not support position:fixed. There are many solutions on the Internet. Some of them are successfully debugged on ie6 and ie7, but they do not work on ie8. The div layer still floats following the scroll bar. The following summarizes the methods, which can be used in ie6. The debugging was successful on both ie7 and ie8, and when the page scroll bar scrolls, the effect is quite good, and the div layer does not flicker.

Copy code The code is as follows:


css:

Copy code The code is as follows:

.fixed{
position:fixed; / *For other browsers such as Firefox,*/
Top: 700px;/*Ibid 同 同*/
Width: 30px;
Height: 30px;
Cursor: Pointer;
Display: none;
}
.ie{ _position: absolute;
_clear: both;
_top:expression(eval(document.compatMode &&
document.compatMode=='CSS1Compat' )                                                                                documentElement                                                                                                                                           . .clientHeight-this.clientHeight) - 1); }
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn