DEV Community

Cover image for I made a Vue App to play around with Backdrop Filters
Luis Augusto
Luis Augusto

Posted on

4 1

I made a Vue App to play around with Backdrop Filters

backdrop-filter is a pretty neat tool in CSS that allow you to add filters to elements behind the target element. That differs from the filter property, which applies a filter to the targeted element itself. They both use the same filter types, so once you've learn one you can apply the same knowledge to the other.

backdrop-filter works on most modern browsers except Firefox (see Can I Use). You should be able to enable it in Firefox by setting the layout.css.backdrop-filter.enabled preference to true in about:config, but I couldn't get it to work.

Here's the pen, feel free to play around with it to make your own combination of filter styles! I built it in Vue, and you can add as many filter layers as you want, remove them and move them around to get all sorts of effects. Try scrolling the page to see how backdrop-filter affects different parts of the background:

You can learn more about backdrop-filter in the MDN Web Docs.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Best practices for optimal infrastructure performance with Magento

Running a Magento store? Struggling with performance bottlenecks? Join us and get actionable insights and real-world strategies to keep your store fast and reliable.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️