我正试图将这个CSS3 webkit动画转换成跨浏览器兼容--主要是在火狐。
CSS3元素似乎是受支持的,但我没有运气。如有任何建议,敬请见谅!
Plunkr:http://plnkr.co/edit/UlLIcnQRAsjY5CGEvKxq?p=catalogue
.site__title {
color: #f35626;
background-image: -webkit-linear-gradient(92deg,#f35626,#feab3a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-animation: hue 60s infinite linear;
background-image: -moz-linear-gradient(92deg,#f35626,#feab3a);
-moz-background-clip: text;
-moz-text-fill-color: transparent;
-moz-animation: hue_m 60s infinite linear;
}
@-webkit-keyframes hue {
from {
-webkit-filter: hue-rotate(0deg);
}
to {
-webkit-filter: hue-rotate(-360deg);
}
}
@-moz-keyframes hue_m{
from { -moz-filter: hue-rotate(0deg); }
to { -moz-filter: hue-rotate(-360deg); }
}发布于 2015-03-10 11:19:28
Firefox不支持带前缀的关键帧,只支持官方语法,所以这将适用于Safari (或-webkit-)以外的所有其他浏览器:
@keyframes hue_m {
from {
-moz-filter: hue-rotate(0deg);
-ms-filter: hue-rotate(0deg);
filter: hue-rotate(0deg);
}
to {
-moz-filter: hue-rotate(-360deg);
-ms-filter: hue-rotate(0deg);
filter: hue-rotate(-360deg);
}
}请参阅MDN上关键帧的说明:https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes
https://stackoverflow.com/questions/28961941
复制相似问题