简体   繁体   English

如何让导航栏折叠与动画汉堡包一起使用?

[英]How do I get navbar-collapse to work with animated hamburger?

I've got a navbar that is supposed to collapse into a hamburger icon on mobile.我有一个导航栏,它应该在移动设备上折叠成一个汉堡包图标。 I got it all working and then I added additional styling and animation to the hamburger button and now the hamburger button is always visible.我让一切正常,然后我为汉堡按钮添加了额外的样式和动画,现在汉堡按钮始终可见。 It works fine, but I need it to be invisible when it is in normal desktop view.它工作正常,但我需要它在正常桌面视图中不可见。

https://github.com/thedonquixotic/UXReboot2 https://github.com/thedonquixotic/UXReboot2

Here's a link to the github page I'm hosting stuff on.这是我托管内容的 github 页面的链接。 The relevant file is indexcopy.html相关文件是 indexcopy.html

I hope I've provided enough information.我希望我提供了足够的信息。 I've been troubleshooting this all day and can't seem to figure out what I'm doing wrong.我一整天都在解决这个问题,似乎无法弄清楚我做错了什么。

Really simple really.真的很简单。 The cmn-toggle class was overriding the default media queries for navbar-toggle in bootstrap. cmn-toggle 类在引导程序中覆盖了导航栏切换的默认媒体查询。 So I just opened up my bootstrap file and added an !important to the media query for mobile=not visible setting.所以我只是打开了我的引导程序文件,并在媒体查询中添加了一个 !important 以进行 mobile=not visible 设置。 Fixed it right up!直接修好了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM