Bootstrap 4 Tutorial
An picture can have rounded corners by using the .rounded class:

The image is shaped into a circle with the .rounded-circle class:

The .img-thumbnail class shapes the picture to a thumbnail (bordered):

Use the .float-right or .float-left classes to float an image to the right or left, respectively:

You can add the utility classes to center an image. .d-block (display:block) and .mx-auto (margin:auto) to the image:

There are several image sizes. Screens also do this. Images that are responsive change size on the fly to fit the screen.
By giving the <img> element a .img-fluid class, you may create responsive images. At that point, the image will smoothly scale to the parent element.
The picture has height: auto and max-width: 100%; applied to it by the .img-fluid class:

CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.