Bootstrap 4 Beta上的垂直固定顶部导航栏 [英] Vertical fixed top navbar on Bootstrap 4 Beta

查看:329
本文介绍了Bootstrap 4 Beta上的垂直固定顶部导航栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Bootstrap 4 Beta 构建垂直的固定顶部导航栏.我在网上发现了Bootstrap v4.0.0-alpha.6的几个示例,但它们不适用于Bootstrap 4 Beta.我有一个问题,当导航栏采用固定顶部类时,链接和折叠的导航栏会向左移动.以下是带有代码的html图像的链接:

I'm trying to build a vertical fixed top navbar with Bootstrap 4 Beta. I have found on the web several examples of Bootstrap v4.0.0-alpha.6, but they do not work with Bootstrap 4 Beta. I have the problem that when the navbar assumes the fixed-top class the links and the the collapsed navbar move to the left. Below are links to html image with code:

HTML代码

您可以在以下地址看到菜单行为和代码: http://www.fedelemarcopascuzzi.it/verticalnavbar/

You can see the menu behavior and code at this address: http://www.fedelemarcopascuzzi.it/verticalnavbar/

推荐答案

我遇到了完全相同的问题!该行为看起来有点像它认为显示屏很小,并且正在像在电话上一样呈现菜单.

I am experiencing the exact same problem! The behavior looks a bit like it thinks the display is small and is rendering the menu as if it were on a phone.

Alpha示例不起作用,此代码对我有用: https://getbootstrap.com/docs/4.0/examples/navbar-top -fixed/

Alpha samples don't work, this code is working for me: https://getbootstrap.com/docs/4.0/examples/navbar-top-fixed/

这篇关于Bootstrap 4 Beta上的垂直固定顶部导航栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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