简要咨询咨询QQ网站导航网站搜索手机站点联系我们设为首页加入收藏 

IE6中的position:fixed定位兼容性写法分享

来源:易贤网   阅读:1527 次  日期:2014-08-14 17:21:06

温馨提示:易贤网小编为您整理了“IE6中的position:fixed定位兼容性写法分享”,方便广大网友查阅!

非IE6下的写法大家一般都清楚如何写;这里就不展示了;

切入正题,以下的IE6下CSS的兼容性写法:

代码如下:

/* 修正IE6振动bug */

html,* html body{background-image:url(about:blank);background-attachment:fixed;}

/* IE6 头部固定 */

html .fixed-top{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}

/* IE6 右侧固定 */

html .fixed-right{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));}

/* IE6 底部固定 */

html .fixed-bottom{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}

/* IE6 左侧固定 */

* html .fixed-left{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}

更多信息请查看IT技术专栏

更多信息请查看网页制作
点此处就本文及相关问题在本站进行非正式的简要咨询(便捷快速)】     【点此处查询各地各类考试咨询QQ号码及交流群
上一篇:Link 标签 rel=Stylesheet的实际作用
下一篇:css的border和clear属性使用方法和示例
易贤网手机网站地址:IE6中的position:fixed定位兼容性写法分享
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!