是否可以编写一个 div 以使其能够模糊其下的任何图像?
像这样的东西:
这可以用-webkit
也许以某种方式完成吗?
Not with CSS on its own, but you can pull a similar effect off with Canvas and the StackBlurforCanvas library. See this
UPDATE: Looks like backdrop-filter
was recently introduced to Webkit nightly, so eventually we'll be able to do this with CSS only. Yay!
不幸的是,这不能纯粹使用 CSS 来完成。尽管 webkit-filter 支持模糊,但它不支持模糊它所应用的元素以外的任何内容。
有一种更hacky的方法可以做到这一点,在这里描述 - http://css-tricks.com/blurry-background-effect/