加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

twitter-bootstrap – 禁用Bootstrap 3导航栏在中视口大小的2行

发布时间:2020-12-18 00:08:18 所属栏目:安全 来源:网络整理
导读:我的Bootstrap 3 navbar是一个大视口的1行。然后,当我开始收缩浏览器窗口时,它切换到2行,其中正确的内容(“Hello用户名”,“注销”)在第二行。 然后再调整大小后,它变成1行,菜单项目消失,菜单按钮仅存在。 如何跳过2行阶段? 解决方法 折叠导航条,仅
我的Bootstrap 3 navbar是一个大视口的1行。然后,当我开始收缩浏览器窗口时,它切换到2行,其中正确的内容(“Hello用户名”,“注销”)在第二行。

然后再调整大小后,它变成1行,菜单项目消失,菜单按钮仅存在。

如何跳过2行阶段?

解决方法

折叠导航条,仅菜单按钮和水平2或1行导航条之间的点(屏幕宽度)由grid-float-breakpoint定义。

将此值设置为较高的值,默认值为768px将跳过2行fase。尝试992px,中间网格的边界。

要更改grid-float-breakpoint,您将有两个选项:

>从github下载源代码,在variables.less中更改@ grid-float-breakpoint并重新编译引导程序
>使用customizer和下载你自己的副本

参见:http://stackoverflow.com/a/18944192/1596547

更新

通过cvrebert on https://github.com/twbs/bootstrap/issues/11539#issuecomment-28805244:

您的选择是:

  • change the grid float breakpoint so that the navbar stays collapsed until the screen is wide enough for your big navbar
  • use 07004 to hide some parts of the navbar at narrower screen widths so that it fits at those widths
  • rework your navbar items so that they’re shorter / less verbose

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读