Secondary
From Bootstrap for MediaWiki
| Color | ||
|---|---|---|
| Name | Secondary | |
| Description | A grey color used mainly as background. | |
| Provider | Skin, BootstrapComponents | |
| Prefixes | bg, text, alert, text-bg |
|
| Extension Components | Alert, Badge, Button, Card, Modal, Popover | |
| Reference | getbootstrap.com - color | |
Updated for Bootstrap 5. Parts of this page's Bootstrap 4 code no longer work with Bootstrap 5. Wikis moving to Bootstrap 5, for example with Chameleon 6, need to update such content too. See the Bootstrap 4 version of this page.
Background
- Code
<div class="p-3 text-light bg-secondary" >
This is div with light text over a secondary background!
</div>
- Result
This is div with light text over a secondary background!
Text
- Code
<div class="p-3 text-secondary bg-dark" >
This is div with secondary text over a dark background!
</div>
- Result
This is div with secondary text over a dark background!
Alert
- Code
<div class="alert alert-secondary" role="alert">
This is a secondary alert — check it out!
</div>
- Result
This is a secondary alert — check it out!
Badge
- Code
===Example heading <span class="badge text-bg-secondary">New</span>===
- Result
Example heading New
Card
- Code
<div class="card text-white bg-secondary mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<h5 class="card-title">Secondary card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
- Result
Header
Secondary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
