IE6中的position:fixed定位兼容性写法教程-成都快上网建站

IE6中的position:fixed定位兼容性写法教程

这篇文章主要介绍“IE6中的position:fixed定位兼容性写法教程”,在日常操作中,相信很多人在IE6中的position:fixed定位兼容性写法教程问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”IE6中的position:fixed定位兼容性写法教程”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

庐江网站建设公司创新互联建站,庐江网站设计制作,有大型网站制作公司丰富经验。已为庐江超过千家提供企业网站建设服务。企业网站搭建\外贸网站建设要多少钱,请找那个售后服务好的庐江做网站的公司定做!

代码如下:

/* 修正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));}

到此,关于“IE6中的position:fixed定位兼容性写法教程”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联网站,小编会继续努力为大家带来更多实用的文章!


名称栏目:IE6中的position:fixed定位兼容性写法教程
文章出自:http://kswjz.com/article/jssocd.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流