兼容性好的悬浮层怎么做?
因为ie6的position的fixed属性有bug,所以必须修改css或者用js
我网上搜索了下,一种做法是在css里加上
html{overflow:hidden;}
body{height:100%;overflow:auto;}
然后<div style="position:fixed;width...">这样
但我页面上其他position为absolute的元素也会被fix
后来我用了js的onscroll()方法,但这样看上去不流畅,客户不喜欢
然后又找了个
postion: absolute;
bottom: auto;
top: expression( eval(document.compatMode && document.compatMode==’CSS1Compat’) ? documentElement.scrollTop + (documentElement.clientHeight – this.clientHeight) – 1 : document.body.scrollTop + (document.body.clientHeight – this.clientHeight) – 1);
但没效果
有没有高手以前遇到过这类问题?怎么解决的?