Colors

Colors Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles. Open example on getbootstrap.com <p class="text-muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p> <p class="text-primary">Nullam id dolor id nibh ultricies vehicula ut id elit.</p> <p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.<

Code

Code Styles for inline code snippets and longer, multiline blocks of code. Contents Inline code Code blocks Variables User input Sample output Inline code Wrap inline snippets of code with <code>. Be sure to escape HTML angle brackets. Open example on getbootstrap.com For example, <code>&lt;section&gt;</code> should be wrapped as inline. Code blocks Use <pre>s for multiple lines of code. Once again, be sure to escape any angle brackets in the code for proper re

Close icon

Close icon Use a generic close icon for dismissing content like modals and alerts. Be sure to include text for screen readers, as we’ve done with aria-label. Open example on getbootstrap.com <button type="button" class="close" aria-label="Close"> <span aria-hidden="true">&times;</span> </button>

Carousel

Carousel The carousel is a slideshow for cycling through a series of content, built with CSS 3D transforms and a bit of JavaScript. It works with a series of images, text, or custom markup. It also includes support for previous/next controls and indicators. In browsers where the Page Visibility API is supported, the carousel will avoid sliding when the webpage is not visible to the user (such as when the browser tab is inactive, the browser window is minimized, etc.). Please be aware that neste

Contents

Contents Bootstrap can come in one of two forms, as precompiled or source code. Learn more about each flavor’s contents and structure below. Remember, no matter the implementation flavor, Bootstrap’s JavaScript plugins require jQuery. Precompiled Bootstrap Once downloaded, unzip the compressed folder and you’ll see something like this: bootstrap/ ├── css/ │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ └── bootstrap.min.css.map └── js/ ├── bootstrap.js └──

Customization options

Customization options Customize Bootstrap 4 with our built-in custom variables file and easily toggle global CSS preferences with new $enable-* Sass variables. Override a variable’s value and recompile with the included Gruntfile as needed. Customizing variables Bootstrap 4 ships with a _custom.scss file for easy overriding of default variables in /scss/_variables.scss. Copy and paste relevant lines from there into the _custom.scss file, modify the values, and recompile your Sass to change our

Navs

Navs Navigation available in Bootstrap share general markup and styles, from the base .nav class to the active and disabled states. Swap modifier classes to switch between each style. Contents Base nav Available styles Horizontal alignment Vertical Tabs Pills Fill and justify Working with flex utilities Regarding accessibility Using dropdowns Tabs with dropdowns Pills with dropdowns JavaScript behavior Using data attributes Via JavaScript Fade effect Methods $().tab .tab(‘show’) Events

Build tools

Build tools Bootstrap uses Grunt for its CSS and JavaScript build system and Jekyll for the written documentation. Our Gruntfile includes convenient methods for working with the framework, including compiling code, running tests, and more. Contents Tooling setup Using Grunt Autoprefixer Local documentation Troubleshooting Tooling setup To use our Gruntfile and run our documentation locally, you’ll need a copy of Bootstrap’s source files, Node, and Grunt. Follow these steps and you should be r

Display property

Display property Use .d-block, .d-inline, or .d-inline-block to simply set an element’s display property to block, inline, or inline-block (respectively). To make an element display: none, use our responsive utilities instead. Open example on getbootstrap.com <div class="d-inline bg-success">Inline</div> <div class="d-inline bg-success">Inline</div> Open example on getbootstrap.com <span class="d-block bg-primary">Block</span> Open example on getbootstrap.com

Modal

Modal Modals are streamlined, but flexible dialog prompts powered by JavaScript. They support a number of use cases from user notification to completely custom content and feature a handful of helpful subcomponents, sizes, and more. Contents How it works Examples Modal components Live demo Scrolling long content Tooltips and popovers Using the grid Varying modal content Remove animation Dynamic heights Accessibility Embedding YouTube videos Optional sizes Usage Via data attributes Via JavaSc