当前位置: 移动技术网 > IT编程>网页制作>CSS > IE6支持position:fixed完美解决方法

IE6支持position:fixed完美解决方法

2017年12月08日  | 移动技术网IT编程  | 我要评论
今天去一老外站看到了这他站上的十分平滑但却没有js,好奇,原来。。巧妙啊,分享下,相对而言比较节省资源。但效果好,使用方便,兼顾w3c。哈哈

复制代码 代码如下:

<!-- compliance patch for microsoft browsers -->
<!--[if lt ie 7]><link rel="stylesheet" href="ie-stuff.css" type="text/css" media="screen"/><![endif]-->


ie-stuff.css

复制代码 代码如下:

#footer {
position: absolute;
bottom: auto;
clear: both;
top:e­xpression(eval(document.compatmode &&
document.compatmode=='css1compat') ?
documentelement.scrolltop
+(documentelement.clientheight-this.clientheight) - 1
: document.body.scrolltop
+(document.body.clientheight-this.clientheight) - 1);
}

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网