ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 5 Card Background Color
Source Code
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"> <title>Bootstrap 5 Card Background Color</title> </head> <body> <h1 class="text-center">Bootstrap Colored Card</h1> <p class="text-justify text-center">Let us understand bootstrap colored card concept.</p> <div class="container"> <div class="row"> <div class="col-12 col-sm-8 offset-sm-2"> <div class="card bg-primary mb-2"> <div class="card-body"> <p class="card-text">Bootstrap card can support text information,images,link,list-group,navs etc.</p> </div> </div> <div class="card bg-danger mb-2"> <div class="card-body"> <p class="card-text">Bootstrap card can support text information,images,link,list-group,navs etc.</p> </div> </div> <div class="card bg-warning mb-2"> <div class="card-body"> <p class="card-text">Bootstrap card can support text information,images,link,list-group,navs etc.</p> </div> </div> <div class="card bg-sucess mb-2"> <div class="card-body"> <p class="card-text">Bootstrap card can support text information,images,link,list-group,navs etc.</p> </div> </div> <div class="card bg-info mb-2"> <div class="card-body"> <p class="card-text">Bootstrap card can support text information,images,link,list-group,navs etc.</p> </div> </div> <div class="card bg-light mb-2"> <div class="card-body"> <p class="card-text">Bootstrap card can support text information,images,link,list-group,navs etc.</p> </div> </div> <div class="card bg-dark mb-2 text-white"> <div class="card-body"> <p class="card-text">Bootstrap card can support text information,images,link,list-group,navs etc.</p> </div> </div> <div class="card bg-secondary mb-2 text-white"> <div class="card-body"> <p class="card-text">Bootstrap card can support text information,images,link,list-group,navs etc.</p> </div> </div> </div><!--/offset-sm-2--> </div><!--/row--> </div><!--/container--> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"></script> </body> </html>
Output :
Running