[英]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.