小提琴:http: //jsfiddle.net/EzuTT/
CSS
#bottomfadebar {
position:fixed;
z-index: 2;
bottom: 0px;
width:267px;
height:84px;
background-color:#666;
}
#content{
width:2000px;
background-color:#ccc;
}
HTML
<div id="content">
This is all of the data. Theres lots of it. so the user will have to scroll horizontally. the bottom bar should go out of view as you scroll further to the right because there's so much data. the bottom bar should only stay "fixed" to the bottom, not to the left hand corner.
</div>
<div id="bottomfadebar">
THIS SHOULD SCROLL HORIZONALLY AS THE PAGE DOES
</div>
最终,当您向右滚动以查看更多内容 div 时,#bottomfadebar div 继续停留在左下角。我试图弄清楚如何让bottomfadebar DIV滚动到屏幕的左侧,但仍然像当前一样固定在窗口的底部。
- - - 编辑!!!
好的,所以我对此有点吹毛求疵,因为我认为这很容易解释,但后来我意识到绝对因素会出现。它实际上应该位于居中的 NAV div 内。
它确实需要坚持“容器”区域内的绝对左侧:0....我应该指定,我很抱歉。不知道该怎么做。