CSS在滚动的背景迷离 [英] CSS background blur on scroll
本文介绍了CSS在滚动的背景迷离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有固定的背景图像,滚动我想要的图像模糊。
I have fixed background image and upon scroll I want the image to go blur. I know how to do blur in css but do it at specific scroll position.
这里是一个例子:
https://medium.com/good-music/f160ba9e6c52
任何想法,例子,建议的片段
Any thoughts, examples, advice of snippets will be helpful.
感谢
推荐答案
你要。考虑到浏览器支持,它使用了2张图片,而不是模糊:
This codepen does exactly what you want. With browser support in mind it uses 2 images though instead of blur:
http ://codepen.io/sota0805/pen/pqLcv
这篇关于CSS在滚动的背景迷离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文