Bootstrap | Images

Bootstrap | Images


Hello folks! welcome back to a new section of our tutorial on Bootstrap. In this tutorial guide, we are going to be discussing about the Bootstrap support for images.

Bootstrap gives three different classes that can be used to apply some simple styles to images -

  • .img-rounded - adds border-radius:6px to give the image rounded corners.
  • .img-circle - adds border-radius:500px to make the entire image round.
  • .img-thumbnail - adds a bit of padding and a gray border.

Example

Following example demonstrates the above classes -

<img src = "/bootstrap/images/download.png" class = "img-rounded">
<img src = "/bootstrap/images/download.png" class = "img-circle">
<img src = "/bootstrap/images/download.png" class = "img-thumbnail">

Output

When the above example is executed, it will produce the following result -

Left-rounded image Circle image Not rounded image


Alright guys! This is where we are going to be rounding up for this tutorial. In our next tutorial guide, we are going to be studying about the Bootstrap Helper Classes.

Feel free to ask your questions where necessary and we will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.