如何使用Twitter自举响应改变导航栏崩溃阈值? [英] How to change navbar collapse threshold using Twitter bootstrap-responsive?

查看:223
本文介绍了如何使用Twitter自举响应改变导航栏崩溃阈值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Rails 3.1.2项目中使用Twitter Bootstrap 2.0.1,使用bootstrap-sass实现。我正在加载 bootstrap.css bootstrap-responsive.css 文件,以及 bootstrap-collapse.js Javascript。

I'm using Twitter Bootstrap 2.0.1 in a Rails 3.1.2 project, implemented with bootstrap-sass. I'm loading both the bootstrap.css and the bootstrap-responsive.css files, as well as the bootstrap-collapse.js Javascript.

我有一个流体布局,导航条类似于 example 。此操作遵循导航栏响应变化说明此处。它工作正常:如果页面窄于约940px,导航栏折叠并显示一个按钮,我可以点击展开。

I have a fluid layout with a navbar similar to the example. This follows the navbar "responsive variation" instructions here. It works fine: if the page is narrower than about 940px, the navbar collapses and displays a "button" that I can click on to expand.

但是我的导航栏看起来不错缩小到大约550像素宽,即它不需要折叠,除非屏幕非常窄。

However my navbar looks good down to about 550px wide, i.e. it doesn't need to be collapsed unless the screen is very narrow.

如何让Bootstrap只折叠导航栏

How do I tell Bootstrap to only collapse the navbar if the screen is less than 550px wide?

请注意,此时我不会修改其他响应行为,例如

Note that at this point I do not want to modify the other responsive behaviors, e.g. stacking elements instead of displaying them side by side.

推荐答案

您正在寻找的第239行bootstrap- responsive.css

@media (max-width: 979px) {...}

max-width value触发响应导航。更改为550px左右,它应该调整大小。

Where the max-width value triggers the responsive nav. Change it to 550px or so and it should resize fine.

这篇关于如何使用Twitter自举响应改变导航栏崩溃阈值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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