gpt4 book ai didi

html - 带有 Bootstrap 流体布局的可滚动侧边栏

转载 作者:太空宇宙 更新时间:2023-11-04 14:59:06 25 4
gpt4 key购买 nike

我需要一些帮助,我想要一个侧边栏和一个使用 Bootstrap 流体布局的内容 div,但我无法使侧边栏可滚动,而内容 div 则不能。我已经尝试过使用 overflow:hidden;在 body 上并在侧边栏 div 上应用 overflow:auto 但它不起作用,我错过了什么?这是我的 scss 代码:

  #main-container{
margin-left:0;
margin-top:60px;
padding:0px;
.span3{
background-color:white;
ul{
margin: 0;

li#song{
background-image: url($images+'chevron.png');
background-position: right center;
background-repeat: no-repeat;
background-color:white;
color: #666;
border-top: 1px solid #B4B4B4;
list-style-type: none;
padding: 10px 10px 10px 10px;
}
}
}
}

.maxheight{
height:100%;
}

.no-overflow{
overflow-y:hidden;
}

.scrollable{
height:100%;
overflow-x:hidden;
}

这是示例代码,左边的 div 是我要滚动的内容:http://jsfiddle.net/xYDRg/

最佳答案

您需要为该 div 设置高度:

#lista-canciones{
height: 350px;
}

http://jsfiddle.net/xYDRg/1/

关于html - 带有 Bootstrap 流体布局的可滚动侧边栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16642360/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com