0
点赞
收藏
分享

微信扫一扫

兼容ie6/ie7浏览器抖动的头部固定css

westfallon 2022-09-14 阅读 167


以往写过​​网页头部nav滚动时顶部固定​​

但是在ie6/ie7中会出现先下滚动式,页面在颤抖,对就是颤抖,针对这个问题,在网上查了原因,做了html背景的防抖,代码如下:

html{ _background-image:url(about:blank); _background-attachment:fixed;/** 防止 ie6 抖动 **/} 
.float{ position:fixed; z-index:999999; top:0px;}
* html .float{ position:absolute; _top:expression(documentElement.scrollTop-0);}

举报

相关推荐

0 条评论