[英]position: fixed not referring parent relative left position
我有一个例子:向下滚动时,滚动条到达RHS面板标题时,RHS面板处于浮动状态。
http://www.elankeeran.com/test/RHSpanel.htm
但是在向下滚动时,RHS面板跳至屏幕外; 我不为什么固定的位置不引用父相对位置。 它指的是身体的左侧位置。
在低于css后更改其工作正常
#floating-box{position: absolute;width:100%;width:960px; margin:0 auto;}
如果有人知道更好的解决方案,请告诉我。
var wHeight = $(window).height();
$('.right-panel').css("height",wHeight-80);
if ( scrollY > bodyY && isfixed ) {
$floatingbox.stop().css({
position: 'fixed',
// left: wLeft,
top: 10
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.