因为css的position:fixed属性在ie6下是无效的, 所以需要用到一种可行的解决方案, 发现在渴切css框架中,兼容IE6的定位属性fixed,固定不动样式,解决了这一问题,并且给了很详尽的描述,下面将CSS代码摘录给大家:.fixed{
position:fixed;
clip:rect(0 100% 100% 0);
_position:absolute;
/* 底部 */
bottom:0px;
left:0px;
_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);
/*_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);*/
/* 左侧 */
/*left:0px;*/
/*_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);*/
/*_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);*/
}
/* 解决固定层在IE6下闪的问题 */
*html{
background-image:url(about:blank);
background-attachment:fixed;
}
本文介绍了如何处理CSS中position:fixed在IE6浏览器下不生效的问题。通过使用特定的hack技巧,如_position:absolute结合_expression表达式,实现了在IE6下的固定定位效果。同时,为了防止闪烁,引入了背景图片和背景附件的设置。这种方法为开发者提供了在旧版IE浏览器中实现fixed定位的一种解决方案。
805

被折叠的 条评论
为什么被折叠?



