IE6 CSS Fixed 固定位置 防闪屏
2015-09-18 15:52
666 查看
让层一直固定在页面上,常用的四个角代码,加入仿闪屏样式,稍加修改即可使用。
.fixed-top{position:fixed;bottom:auto;top:0px;} .fixed-bottom{position:fixed;bottom:0px;top:auto;} .fixed-left{position:fixed;right:auto;left:0px;} .fixed-right{position:fixed;right:0px;left:auto;} /* IE6 */ * html,* html body{background-image:url(about:blank);background-attachment:fixed;} * html .fixed-top{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));} * 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));} * 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)));} * html .fixed-left{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}
相关文章推荐
- css3--transform属性
- 解决IE7、IE8、火狐样式不兼容问题,Hack写法
- css3盒模型新知识点(Fllexbox)
- 纯CSS实现的三级导航菜单效果代码
- CSS3.0盒模型display:-webkit-box;的使用
- web前端开发分享-css,js入门篇(转)
- Emmet:HTML/CSS代码快速编写神器(转)
- css标签选择器
- 客户端浏览器缓存Js或者css文件问题
- css3新属性placeholder兼容ie7/ie8
- 链接上的CSS应用
- [CSS]学习总结
- JS+CSS实现TreeMenu二级树形菜单完整实例
- JQ-CSS-实现导航菜单效果
- CSS3 Transform
- CSS3 Transition
- CSS中规定的五种一般字体家族
- css html将图片img标签 水平居中 垂直居中 和水平垂直居中
- transform-origin CSS3 旋转
- 利用css3-animation来制作逐帧动画