Hey there, I've recently started my journey into web development and have encountered a roadblock. I'm trying to blur the background image of a div on hover without affecting the text inside.
I have an id called c1 where I used a javascript function to display text on hover, which is working perfectly fine.
Now, I am looking for a way to use CSS or JavaScript to blur the background image while keeping the text sharp. Is this something achievable?
Here's my current CSS:
#c1 {
float: left;
width: 300px;
padding: 30px;
margin: 15px;
background-image: url(images/cd.png);
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
border-radius: 20px;
height: 150px;
}
#c1:hover {
-webkit-filter: blur(5px);
}
This is how it looks in my HTML:
<div id="productos">
<a name="jproductos"></a>
<ul>
<div id="c1">
</div>
</ul>
</div>