我有一个带下拉菜单的边栏菜单和需要滚动条的长列表。带滚动条隐藏下拉菜单的边栏菜单
我遇到的问题是滚动条不在屏幕上,或者由于overflow: hidden;
或两者都隐藏了下拉菜单。
这里是我的CSS:
/* I want dropdowns to be on the left */
.dropdown-menu {
top: 0;
left: -160px;
}
#rightbar {
position: fixed;
right: 0;
height: 100%;
background: lightgray;
width: 300px;
}
/* Normally, you'd do this, but this makes the dropdown not show; ALSO, the scrollbar is off the screen */
#wrap {
height:100%;
overflow:hidden;
}
#bottomStuff {
height: 100%;
overflow-y: auto;
}
https://jsfiddle.net/cp0fqyt9/
如何获得下拉菜单和滚动条在position: fixed
侧边栏进行工作(无JS)?
#wrap {height:100%; overflow:hidden;}这里隐藏的溢出隐藏了下拉列表 – Bosc
我知道,但是我怎样才能让'bottomStuff'包装物成为屏幕上留下的100%高度...这听起来没有JS。 – Jeff