NBIbatis.WX/css/dx/position-fixed.css
(完整代码) 1KB/*
@ 名称: position:fixed
@ 用法:添加class
@ 注意:
* 如果需要多个方向的固定位置,比如 top + right,需要加两个 class
* 如果加了.sl-fixed-top, 那么就别给这个元素加 top 属性的值
* 为了不出现异常,这个只作为套用。比如要top:30px 的时候,请在 .sl-fixed-top 的子元素内设置
* 由于我们有打包,所以,改solution是可以的,但这是强烈不推荐的,因为不利于维护
*/
.sl-fixed{
position:fixed;
}
/* 相当于正常的 position:fixed; top:0; */
.sl-fixed-top {
bottom:auto;
top:0;
_bottom:auto;
_top:expression(eval(document.documentElement.scrollTop));
}
/* 相当于正常的 position:fixed;bottom:0px; */
.sl-fixed-bottom {
bottom:0;
top:auto;
_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)));
}
/* 相当于正常的 position:fixed;left:0px; */
.sl-fixed-left {
left:0;
_position:absolute;
right:auto;
_left:expression(eval(document.documentElement.scrollLeft));
}
/* 相当于正常的 position:fixed;right:0; */
.sl-fixed-right {
right:0;
left:auto;
_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));
}
/* 当不是 https 时,可以把 # 换成 about:blank 以提升效率 */
html,html body {
_background-image:url('about:blank');
_background-attachment:fixed;
}
/* hack for ie6 */
.sl-fixed-top,.sl-fixed-right,.sl-fixed-bottom,.sl-fixed-left {
_position:absolute;
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
