Bootstrap Q&A Logo
Bootstrap Q&A Part of the Q&A Network

Is there a built-in Bootstrap class for adding a shadow effect to images?

Asked on Sep 27, 2025

bootstrap card images shadow

Answer

Bootstrap provides utility classes to add shadow effects to elements, including images. You can use the `shadow` classes to apply different levels of shadow.
<!-- BEGIN COPY / PASTE -->
        <img src="your-image.jpg" class="img-fluid shadow" alt="Sample Image">
        <!-- END COPY / PASTE -->
Additional Comment:
  • Bootstrap offers several shadow classes: `shadow-sm`, `shadow`, and `shadow-lg` for small, regular, and large shadows, respectively.
  • The `img-fluid` class ensures the image scales properly with the parent element.
  • Replace "your-image.jpg" with the path to your actual image.
✅ Answered with Bootstrap 5 best practices.
← Back to All Questions