<html>
<head>
<style>
img {
animation: mymove 7s infinite;
}
@keyframes mymove {
50% {
filter: grayscale(100%);
filter: grayscale(100%);
}
}
</style>
</head>
<body>
<h1>filter 的动画效果:</h1>
<p>逐渐将图像的颜色更改为黑白(100% 灰度),然后恢复为原始颜色:<p>
<img src="/i/photo/tulip.jpg" alt="tulip" width="300" height="300">
<p><b>注释:</b>Edge 12 或 Internet Explorer 不支持 filter 属性。</p>
</body>
</html>