gpt4 book ai didi

twitter-bootstrap - Bootstrap 3 Navbar 不会在移动浏览器上折叠,但会在尺寸过小的桌面窗口中折叠

转载 作者:行者123 更新时间:2023-12-03 09:38:23 25 4
gpt4 key购买 nike

我的带有最新版本 Bootstrap 的 Rails 4 站点不会在移动设备中崩溃,但是如果我在桌面上打开该站点并缩小窗口,它将崩溃。这是我的导航栏的代码:

<div class = "navbar navbar-inverse navbar-static-top">
<div class = "container">
<a href = "/" class = "navbar-brand" style="color: white;">Earn And Learn</a>
<button class = "navbar-toggle" data-toggle = "collapse" data-target = ".navHeaderCollapse">
<span class = "icon-bar"></span>
<span class = "icon-bar"></span>
<span class = "icon-bar"></span>
</button>
<div class = "collapse navbar-collapse navHeaderCollapse">
<ul class = "nav navbar-nav navbar-right">
<li id="nav_ach"><a href = "/about/achievements" style="color: white;">Achievements</a></li>
<li id="nav_faq"><a href = "/about/faq" style="color: white;">FAQ</a></li>
<li id="nav_test"><a href = "/about/testimonials" style="color: white;">Testimonials</a></li>
<li id="nav_news"><a href = "/about/news" style="color: white;">In the News</a></li>
<li id="nav_steal"><a href = "/steal/index" style=" color: white;">Steal This Idea!</a></li>
<li><a href = "#" data-toggle="modal" data-target="#myModal" style="color: white;">Contact Us</a></li>
</ul>
</div>
</div>
</div>

最佳答案

挖掘 github 问题,结果发现我们错过了这个

<meta name="viewport" content="width=device-width, initial-scale=1.0">

http://getbootstrap.com/css/#overview-mobile

https://github.com/twbs/bootstrap/issues/10550

关于twitter-bootstrap - Bootstrap 3 Navbar 不会在移动浏览器上折叠,但会在尺寸过小的桌面窗口中折叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20020603/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com