【发布时间】:2018-05-17 00:03:11
【问题描述】:
我正在尝试使用 CSS 过滤器在悬停时模糊图像。图像包含在一个按钮中。它适用于 Opera、Chrome 和 Edge。它在 Firefox 或 IE 中不起作用。如果我将过滤器放在按钮本身上,它适用于所有浏览器,但我更喜欢只有图像模糊。任何帮助,将不胜感激。 CSS
button>img:hover {
filter: blur(2px);
}
HTML
<button type="button">
<img src="http://factory38.com/gallery-images/tree_thumb.jpg" width="200" alt="tree">
</button>
演示
【问题讨论】:
标签: html css filter cross-browser