07 Oct Bootstrap Images
Learn how to work with Images in Bootstrap. With that, in this lesson, learn:
- How to create Responsive Images
- How to create Circular Image
- How to create Rounded Corners of an image
- Create Image Thumbnail
- Center an image
We will use the following Bootstrap classes for images:
- Create Responsive Images with the .img-fluid class
- Create a Circular Image with the .rounded-circle class
- Create Rounded Corners of an image with the .rounded class
- Create an Image Thumbnail using the .img-thumbnail class
- Center an image with mx-auto: margin:auto and d-block: display:block
- Align Images with the .float-left and .float-right classes
Example – Bootstrap Images
Let us now see an example of creating images in Bootstrap:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Images Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container">
<img src="https://thegenericwhiz.com/wp-content/uploads/2016/10/Install-WordPress-Plugins-1024x572.png" class="rounded-circle" height="400px" width="400px" alt="Install WordPress"/>
</div>
</body>
</html>
Output

Video Tutorial – Bootstrap Images
The following is the complete video tutorial to learn how to work with Images in Bootstrap:
If you liked the tutorial, spread the word and share the link and our website Studyopedia with others:
Read More:
No Comments