Bootstrap4 Image Shapes
Rounded Image
.roundedThe class can make images display rounded corner effects:
Ellipse Image
.rounded-circleThe class can set elliptical images:
Thumbnail
.img-thumbnailThe class is used to set image thumbnails (images have borders):
Image Alignment
Use.float-rightclass to set images right-aligned, use.float-leftclass to set images left-aligned:
Example
<img src="paris.jpg" class="float-left">
<img src="cinqueterre.jpg" class="float-right">
Try it Yourself »
Centered Image
Use.mx-auto (margin:auto)and .d-block (display:block)class to set image centered alignment:
Responsive Image
Images come in various sizes, and we need to automatically adapt to the size of the screen.
We can do this by adding<img>tag, add.img-fluidclass to set responsive images.
.img-fluidThe class setsmax-width: 100%; 、 height: auto; :
Other Extensions