ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 4 Image Styling
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, shrink-to-fit=no"> <meta name="description" content=""> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <title>Bootstrap 4 Image Styling</title> </head> <body> <div class="container mt-4 text-center"> <h1>Bootstrap 4 Image Styling</h1> <p>In this example, you will learn how to style Bootstrap 4 images through the Bootstrap predefined classes such as .rounded, .rounded-circle, and .img-thumbnail.</p> <div class="row"> <div class="col-sm-4 col-12"> <img src="../code-support/images/bootstrap/bird.jpg" class="rounded img-fluid" alt="Rounded Image"> </div> <!--/first column--> <div class="col-sm-4 col-12 text-center"> <img src="../code-support/images/bootstrap/lily.jpg" class="rounded-circle img-fluid" alt="Circular Image" style="width:240px;height:240px;"> </div> <!--/second column--> <div class="col-sm-4 col-12"> <img src="../code-support/images/bootstrap/rose-flower.jpg" class="img-thumbnail img-fluid" alt="Thumbnail Image"> </div> <!--/third column--> </div> <!--/row--> </div> <!--/container--> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> </body> </html>
Output :
Running