我有一个div,其中包含动画,该动画可以在Chrome中完美运行。
这是代码...
@-webkit-keyframes adjustHue {
0% { -webkit-filter: hue-rotate(0deg); }
25% { -webkit-filter: hue-rotate(45deg); }
50% { -webkit-filter: hue-rotate(90deg); }
75% { -webkit-filter: hue-rotate(135deg); }
100% { -webkit-filter: hue-rotate(180deg); }
}
.blocky {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
text-align: center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
-webkit-animation: adjustHue 4s alternate infinite;
-moz-animation: adjustHue 4s alternate infinite;
-o-animation: adjustHue 4s alternate infinite;
animation: adjustHue 4s alternate infinite;
}
因此,我可以复制-webkit-keyframes AdjustHue,并复制-moz-keyframes AdjustHue,甚至仅复制关键帧AdjustHue,但是我尝试将-webkit-filter替换为-moz-filter,甚至只是过滤没有成功。基本上,我需要使用跨浏览器的效果。
最佳答案
如您所见,here,Firefox中尚不支持filter
。您可以尝试以另一种方式实现此目的,但目前,筛选器在Firefox中尚不可用。