简体   繁体   English

仅下载引导程序导航栏?

[英]Download bootstrap navbar only?

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,多谢,

Okay..... Problem solved!好的……问题解决了! Adrian missed just one selection (component animations). Adrian 只错过了一项选择(组件动画)。 ... the nav bar in mobile was always open, rather than being 'click to open'. ...移动设备中的导航栏始终处于打开状态,而不是“点击打开”。 Thanks though to Adrian for the starting point.感谢 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!!!!!该死的太棒了!!!!!

For a complete navbar like the image below,对于如下图所示的完整navbar

Normal普通的

引导导航栏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)离线演示(先下载)

Bootstrap 4引导程序 4

If you're using Bootstrap 4, and couldn't find the "Bootstrap Customize", there's an alternative called Bootstrap Theming如果您使用的是 Bootstrap 4,并且找不到“Bootstrap Customize”,还有一个名为Bootstrap Theming的替代方法

Here are the minimum required SCSS files to get Navbar to work:以下是使导航栏工作所需的最低 SCSS 文件:

 // Required (Must-have for any SCSS file(s) to work)
 @import "node_modules/bootstrap/scss/functions";
 @import "node_modules/bootstrap/scss/variables";
 @import "node_modules/bootstrap/scss/mixins";
 
 // Bootstrap Navbar Styles
 @import "node_modules/bootstrap/scss/reboot"; // Bootstrap Normalize (If you don't need normalization, delete it)
 @import "node_modules/bootstrap/scss/grid"; // You can get rid of it, the layout will get worse on Mobile, but you can fix it
 @import "node_modules/bootstrap/scss/nav";
 @import "node_modules/bootstrap/scss/navbar";
 @import "node_modules/bootstrap/scss/dropdown";
 @import "node_modules/bootstrap/scss/transitions"; // When click on Mobile Button Menu Toggle, the menu gets collapse/uncollapse 

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

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