Bootstrap 4 Hover effects
Bootstrap 4 Hover effects component
Bootstrap hover effect appears when a user positions computer cursor over an element without activating it. Hover effects make a website more interactive.
Basic Bootstrap 4 version
<div class="view overlay">
<img src="https://mdbootstrap.com/img/Photos/Others/forest-sm.webp" class="img-fluid " alt="smaple image">
<div class="mask flex-center rgba-blue-light">
<p class="white-text">Light overlay</p>
</div>
</div>
Above is an example template for a Hover effects in the Bootstrap 4 version based on jQuery. V4 is an older version of Bootstrap and we discourage implementing it in new projects.
Below you will find the same component but in the latest, more modern Bootstrap 5. We encourage you to use the v5 version instead, the v5 is more lightweight, more reliable and based on pure JavaScript instead of jQuery.
This page only compares the two version, you can find full documentation - with multiple options & API details via one of the links below:
Bootstrap v5 - full documentation
Bootstrap v4 - full documentation
Basic Bootstrap 5 version
<div
class="bg-image hover-overlay ripple shadow-1-strong rounded"
data-mdb-ripple-color="light"
>
<img src="https://mdbcdn.b-cdn.net/img/new/fluid/city/113.webp" class="w-100" alt="Louvre" />
<a href="#!">
<div class="mask" style="background-color: hsla(0, 0%, 98%, 0.2)"></div>
</a>
</div>