Horje Website
Bootstrap 4 Display Block Classes – Learn Display block classes – Bootstrap Code

Bootstrap 4 Display Block Classes – Learn Display block classes

Bootstrap 4 Display Block Classes - Learn Display block classes - Bootstrap Code


 
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <title>Bootstrap 4 Display Block Classes</title>
  7. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
  8. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  9. <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  10. <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
  11. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
  12. <style>
  13.     .bs-example{
  14.     margin: 20px;
  15. }
  16. .bs-example span{
  17. padding: 15px;
  18. margin-bottom: 10px;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <div class="bs-example">
  24. <h2>Display Block Classes</h2>
  25. <p>Use the d-block class to create a block element. Add breakpoints (sm, md, lg, xl) to the classes (d-*-block) to control when the element should be a block element based on the screen width. Resize the browser window to see how it works.</p>
  26. <span class="d-block bg-primary">d-block</span>
  27. <span class="d-sm-block bg-success">d-sm-block</span>
  28. <span class="d-md-block bg-danger">d-md-block</span>
  29. <span class="d-lg-block bg-warning">d-lg-block</span>
  30. <span class="d-xl-block bg-info">d-xl-block</span>
  31. </div>
  32. </body>
  33. </html>



Try Your Self ->



Published:
September 23, 2020
Author:
admin
Category:
Bootstrap Basic, Bootstrap Source Code
Views:
17

This article was posted in Bootstrap Basic, Bootstrap Source Code and tagged , , . Bookmark the permalink. Follow comments with the RSS feed for this post.Post a Comment or leave a trackback: Trackback URL.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Horje © 2011 - 2023