javascript 仅下载引导程序导航栏?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24434062/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-28 02:47:19  来源:igfitidea点击:

Download bootstrap navbar only?

javascriptjqueryhtmlcsstwitter-bootstrap-3

提问by SkewerHed

I'd like to use only the bootstrap navbar in my website without having to download all of the bootstrap code as it interferes with my current classes and divs.

我只想在我的网站中使用引导程序导航栏,而不必下载所有引导程序代码,因为它会干扰我当前的类和 div。

Can anyone tell me which options to include in my custom download?

谁能告诉我在我的自定义下载中包含哪些选项?

I clicked on navbar (it ticks other options which I assume are required for navbar to work) but my navbar won't work after including the css.

我点击了导航栏(它勾选了我认为导航栏工作所需的其他选项)但我的导航栏在包含 css 后将无法工作。

I have the Jquery and Bootstrap CDN links in my code so I'm pretty sure it's just the CSS.

我的代码中有 Jquery 和 Bootstrap CDN 链接,所以我很确定它只是 CSS。

Muchos thanks,

多谢,

采纳答案by Marco-UandL

Okay..... Problem solved! Adrian missed just one selection (component animations). ... the nav bar in mobile was always open, rather than being 'click to open'. Thanks though to Adrian for the starting point.

好的……问题解决了!Adrian 只错过了一项选择(组件动画)。...移动设备中的导航栏始终处于打开状态,而不是“点击打开”。感谢 Adrian 的起点。

I did it the hard way.... trial and error.

我以艰难的方式做到了....反复试验。

To gain minimised script & css files, that allows the nav bar to work in both desktop, and mobile display formats... ... you need to check the following boxes:

要获得最小化的脚本和 css 文件,允许导航栏在桌面和移动显示格式下工作... ...您需要选中以下框:

Common CSS

常见的 CSS

  • Grid System
  • Forms
  • Buttons
  • Responsive Utilities
  • 网格系统
  • 形式
  • 纽扣
  • 响应式实用程序

Components

组件

  • Navs
  • Navbar
  • 导航
  • 导航栏

Javascript Components

Javascript 组件

  • Dropdowns
  • Component animations (for JS) (includes Collapse)
  • 下拉菜单
  • 组件动画(用于 JS)(包括折叠)

JQuery Plugins

JQuery 插件

  • Dropdowns
  • Collapse
  • 下拉菜单
  • 坍塌

Bingo!

答对了!

Bloody marvelous!!!!!

该死的太棒了!!!!!

回答by Adrian Enriquez

For a complete navbarlike the image below,

对于navbar像下图这样的完整,

Normal

普通的

Bootstrap NavbarCollapsed

引导导航栏折叠

Collapsed

折叠

Go to this link - getbootstrap.com/customize

转到此链接 - getbootstrap.com/customize

Once there, uncheck all the checkboxes except for the following:

在那里,取消选中除以下复选框之外的所有复选框:

Common CSS

常见的 CSS

  • Grid System
  • Forms
  • Buttons
  • Responsive Utilities
  • 网格系统
  • 形式
  • 纽扣
  • 响应式实用程序

Components

组件

  • Navs
  • Navbar
  • 导航
  • 导航栏

Javascript Components

Javascript 组件

  • Dropdowns
  • 下拉菜单

jQuery Plugins

jQuery 插件

  • Dropdowns
  • Collapse
  • 下拉菜单
  • 坍塌

Click the compile and download button at the bottom of the page.

单击页面底部的编译和下载按钮。

Or just download the customize I made.

或者只是下载我所做的自定义。

Customized Bootstrap Download Link

自定义引导程序下载链接

Offline Demo (Download First)

离线演示(先下载)