How do you make an image responsive in Bootstrap?
<img src="images/photo.jpg" class="img-fluid" alt="Responsive image">
Live preview
.img-fluid sets max-width: 100%; height: auto;. Other useful classes are .img-thumbnail, .rounded and .rounded-circle. See Images.
Learn more about the similar topics:
| Tutorials |
|---|
| Bootstrap Typography |
| Bootstrap Colors |
| Bootstrap Images |
| Bootstrap Tables |
| Exercises & Assignments |
|---|
| Create a centered page heading and text with Bootstrap |
| Create a striped, hover and responsive table |
| Interview Questions & Answers |
|---|
| How do you make an image responsive in Bootstrap? |
| How do you make a table responsive in Bootstrap? |