Images

Images in Bootstrap are made responsive with . max-width: 100%; and height: auto; are applied to the image so that it scales with the parent element.

SVG images and IE 10

In addition to our , you can use .img-thumbnail to give an image a rounded 1px border appearance.

Images  - 图2

Images  - 图4

  1. <img src="..." class="rounded mx-auto d-block" alt="...">

If you are using the <picture> element to specify multiple <source> elements for a specific , make sure to add the .img-* classes to the <img> and not to the <picture> tag.

  1. <source srcset="..." type="image/svg+xml">
  2. </picture>