使用 Bootstrap 的可滚动侧边栏 [英] Scrollable sidebar using Bootstrap

查看:66
本文介绍了使用 Bootstrap 的可滚动侧边栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在一个网站 H1Z1Atlas.com 上工作,我遇到了一个问题,当侧边栏内容超出页面时,侧边栏没有可滚动的内容,导致内容不显示.

I'm currently working on a website H1Z1Atlas.com and I have a problem where when the sidebar content extends past the page, the sidebar does not have a scrollable causing the content to be not shown.

我也在页面上使用 twitter bootstrap 导航栏,是否有任何简单的修复方法可以获取动态滚动条?

I'm using a twitter bootstrap navbar as well on the page is there any easy fix to get a dynamic scrollbar?

http://i.imgur.com/bA21Txi.png

这是图片的链接.有更多的图层行,但是当屏幕尺寸变小时,它们会消失而不是显示侧边栏.由于angular.js,html有点混乱,所以很难正确显示

Here is a link to the picture. there are more rows of layers however when the screen size becomes to small they just disappear instead of showing a sidebar. The html is a bit confusing due to angular.js so it would be hard to show properly

我希望侧边栏与此页面相同 https://material.angularjs.org/#/ 可以滚动内容的地方

I would like the sidebar to be the same as this page https://material.angularjs.org/#/ where you can scroll the content

推荐答案

没有代码就很难提出任何建议.但是您说您正在使用 twitter bootstrap,所以我建议您执行以下操作,希望它可以解决您的问题.

It's hard to suggest anything without some code. But you said you are using twitter bootstrap so I suggest doing the following and I hope it will solve your problem.

#sidebar-wrapper{
 overflow: auto;
}

祝你好运.

如果只需要垂直滚动,那就是:

If only need the vertical scroll, that would be:

#sidebar-wrapper{
 overflow-y: auto;
}

这篇关于使用 Bootstrap 的可滚动侧边栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆