我有一个带阴影的潜水
filter: drop-shadow(0 0 20px #fff);
-webkit-filter: drop-shadow(0 0 20px #fff);
但是当元素移动时阴影消失。为什么会这样以及如何预防。 我的代码的 jsfiddle:https://jsfiddle.net/vu14anwv/ 问题出现在 chrome 中,在 fire fox 中一切正常。
最佳答案
尝试在您想要显示在其下的元素上添加阴影。
.element-that-is-to-be-under{
filter: drop-shadow(0 0 20px #fff);
-webkit-filter: drop-shadow(0 0 20px #fff);
}
关于css - 为什么元素移动时阴影会隐藏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38700807/