How to apply a CSS filter to a background image

0 votes

Because I'm working within Backbone, I'm utilizing CSS to set a JPEG file as the background picture for a search page. contexts for js

background-image: url("whatever.jpg");

The background is the sole element to which I want to apply a CSS 3 blur filter, but I'm not sure how to style only that one element. When I try:

-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-o-filter: blur(5px);
-ms-filter: blur(5px);
filter: blur(5px);

In my CSS, it styles the entire page rather than just the background, just below the background-image. Is it possible to choose just the image and use the filter on it? Or, is there a method to simply disable the blur for every other component on the page?

Aug 25, 2022 in CSS by Edureka
• 13,620 points

edited 7 hours ago 71 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP