简体   繁体   English

当缩小太多时,如何制作导航栏转换为侧边栏的按钮?

[英]How can I make a navigation bar that converts to a button for a sidebar when scaled down too much?

I have seen many sites with a navigation bar that will convert to a button that opens a menu if the page is scaled down too much. 我见过很多带有导航栏的站点,如果页面缩小太多,导航栏会转换为打开菜单的按钮。 An example of this: www.aurelswonderland.com (Scale the windows width down and watch the nav bar dissapear) 例如:www.aurelswonderland.com(缩小窗口宽度并观看导航栏消失)

How can I implement this myself? 我如何自己实现呢?

Unless you are using Bootstrap or Foundation, I like to use SlickNav. 除非您使用Bootstrap或Foundation,否则我喜欢使用SlickNav。 It's a jQuery plugin that's very easy to use. 这是一个非常易于使用的jQuery插件。 You just call the slicknav() function on the "ul" in your navigation and you're good to go. 您只需在导航中的“ ul”上调用slicknav()函数,就可以了。 You can also pass in options as in most jQuery plugins. 您也可以像大多数jQuery插件一样传递选项。

http://slicknav.com/ http://slicknav.com/

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

相关问题 向下滚动页面时,如何使导航栏下方出现阴影? - How do I make a shadow appear under the navigation bar when I scroll down the page? 如何使该导航栏具有响应性,并使其可以通过按钮访问? - How can I make this navigation bar responsive, making it become accessible with a button? 如何在RNRF中使自定义导航栏透明 - How can I make the custom navigation bar transparent in RNRF 如何在水平网页的导航栏中突出显示? - How can I make a highlight in the navigation bar of a horizontal webpage? 当单击 reactjs 的其他文件中的按钮时,我如何使进度条取得进展 - How i can make progress bar make progress when click a button in other file at reactjs 当用户向下滚动时,如何使侧边栏停在特定div? - How can I make the sidebar stop at a specific div while the user scrolls down? 当我点击向上或向下按钮时,我怎样才能做到这一点,数字增加或减少 - How can I make it so when I click the up or down button, the number increases or decreases 当我将光标移到侧边栏时,子菜单如何从侧边栏向下滑动 - how can the sub-menu slide down from the sidebar when i just take my cursor to it 向下滚动 50px 后,如何让导航栏出现并锁定? - How can I get the navigation bar to appear and lock on after scrolling 50px down? 如何在不制作太多标签的情况下制作超链接 - How do I make hyperlinks without making too much tags
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM