My attempt to create a blurred image effect on a bootstrap card hover is not working as expected. The blur effect works fine without the hover.
Here is the code I have been using:
.card-img {
transition: all 1s ease;
-webkit-filter: blur(0px); /* Chrome, Safari, Opera */
filter: blur(0px);
}
.card-img:hover {
transition: all 1s ease;
-webkit-filter: blur(5px); /* Chrome, Safari, Opera */
filter: blur(5px);
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="card bg-dark text-white mt-4 mb-3 border-dark">
<img class="card-img img-fluid" src="https://www.flightnetwork.com/blog/wp-content/uploads/2018/06/header-journey11.jpg" alt="Card image">
<div class="card-img-overlay">
<h1 class="card-title underline">Welcome to the Motard d'Alsace website!</h1>
<p class="card-text p1 bg-dark">Find your next motorcycle ride now.</p>
<p class="card-text bg-dark">Or share your ride suggestions!</p>
</div>
</div>
Appreciate any assistance with this issue. Thank you!