CSS hue-rotate滤镜改变图片颜色动效实例页面
回到相关文章 »效果:
代码:
CSS代码:
.bird {
width: 300px; height: 232px;
background: url(./piece-bird.png) no-repeat;
background-size: contain;
/* 动画 */
animation: pulse 5s linear infinite;
}
@keyframes pulse {
from {
filter: hue-rotate(0);
}
to {
filter: hue-rotate(360deg);
}
}
HTML代码:
<div class="bird"></div>