[英]Make content inside fixed sidebar scrollable
我做了這個js小提琴: http : //jsfiddle.net/VaCfV/3/
它具有較長的內容,並且內部有固定的側邊欄。 我試圖弄清楚如何使側邊欄#side-content
可滾動不是通過使用overflow-y: scrollable;
但實際上是在用戶使用鼠標滾輪,箭頭鍵,主滾動條等時與頁面一起滾動。
能以某種方式實現嗎?
你可以試試:
#page-wrapper{
overflow: hidden;
position: relative;
width: 100%;
}
#sidebar {
width: 30%;
height: 100%;
position: absolute;
left: 20px;
top:0px;
bottom:0px;
background: #fff;
border-left: 1px solid #000;
border-right: 1px solid #000;
padding: 20px;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.