[英]Remove scrollbars from sidebar
I want to remove the scrollbars on my sidebar, you can have a look at this bootply: 我想删除侧边栏上的滚动条,你可以看看这个bootply:
http://www.bootply.com/DbyYVRupPJ
I have tried some stuff like this 我试过这样的东西
#sidebar{
width: 200px;
border: 1px solid #000;
height: 100%;
}
but I can't get it working properly 但我不能让它正常工作
Anybody able to help me out? 有人能帮帮我吗? :)
:)
Edit: The scroll function should still be active 编辑:滚动功能仍应处于活动状态
Use something like the following code: 使用类似下面的代码:
html, body {
min-height: 100%;
height: 100%;
}
#sidebar{
position: relative;
width: 200px;
border: 1px solid #000;
min-height: 100%;
}
#scroller {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
overflow-y: scroll;
}
Fiddle http://jsfiddle.net/qcv5Q/671/ or http://jsfiddle.net/qcv5Q/672/ if you don't want to have visible scrollbar 如果你不想有可见的滚动条,请小提琴http://jsfiddle.net/qcv5Q/671/或http://jsfiddle.net/qcv5Q/672/
Add the last propierty "overflow-y: hidden". 添加最后一个“overflow-y:hidden”。 Or if you want to remove the x-axis so.. overflow-x: hidden.
或者如果你想删除x轴那么.. overflow-x:hidden。
#sidebar-wrapper {
margin-left: -250px;
left: 70px;
width: 250px;
background: #222;
position: fixed;
height: 100%;
z-index: 10000;
transition: all .4s ease 0s;
overflow-y:hidden; /* NEW ONE */
}
Or if you want that to adjust to the content you have to write: 或者,如果您希望根据您要编写的内容进行调整:
overflow-y:auto;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.