« Bootstrap 5 » : différence entre les versions
De Banane Atomic
Aller à la navigationAller à la recherche
Ligne 87 : | Ligne 87 : | ||
[https://getbootstrap.com/docs/5.0/getting-started/download Download] compiled code or use CDN via jsDelivr or a package manager to get bootstrap. | [https://getbootstrap.com/docs/5.0/getting-started/download Download] compiled code or use CDN via jsDelivr or a package manager to get bootstrap. | ||
<kode lang='html'> | <kode lang='html'> | ||
<! | <!-- CDN --> | ||
< | <!-- CSS --> | ||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" | |||
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous"> | |||
<!-- JavaScript Bundle with Popper --> | |||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" | |||
integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script> | |||
<!-- file in wwwroot --> | |||
<!-- CSS --> | |||
<link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.min.css" /> | |||
<!-- JavaScript Bundle with Popper --> | |||
<script src="lib/bootstrap/dist/js/jquery-3.5.1.slim.min.js"></script> | |||
<script src="lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script> | |||
</kode> | </kode> | ||
= [https://getbootstrap.com/docs/5.0/migration Migrating to v5] = | = [https://getbootstrap.com/docs/5.0/migration Migrating to v5] = |
Version du 15 mai 2021 à 20:43
Links
Utilities
Margin / Padding
class | Description |
---|---|
m-0 | margin: 0 !important |
p-3 | padding: 1rem !important |
mx-auto | margin-right: auto !important margin-left: auto !important |
Side | Description |
---|---|
t | top |
b | bottom |
s | start (left in LTR) |
e | end (right in LTR) |
x | left and right |
y | top and bottom |
Value | Description |
---|---|
0 | 0 |
1 | $spacer * .25 = 0.25rem |
2 | $spacer * .5 = 0.5rem |
3 | $spacer = 1rem |
4 | $spacer * 1.5 = 1.5rem |
5 | $spacer * 3 = 3rem |
auto | auto |
Text
classe | Description |
---|---|
text-center | centrer aligned text |
text-end | end (right) aligned text |
text-uppercase | uppercased text |
fw-bold | bold text |
Components
Collapse
<a data-bs-toggle="collapse" href="#filter" role="button" aria-expanded="false" aria-controls="filter"> <i class="fa fa-filter"></i> </a> <div class="collapse" id="filter"> </div> |
Icons
Installation
Download compiled code or use CDN via jsDelivr or a package manager to get bootstrap.
<!-- CDN --> <!-- CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous"> <!-- JavaScript Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script> <!-- file in wwwroot --> <!-- CSS --> <link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.min.css" /> <!-- JavaScript Bundle with Popper --> <script src="lib/bootstrap/dist/js/jquery-3.5.1.slim.min.js"></script> <script src="lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script> |