body {
background-color: firebrick;
-webkit-animation: color 5s ease-in 0s infinite;
-moz-animation: color 5s linear 0s infinite;
animation: color 5s linear 0s infinite;
}
/* by www.honglonglong.com */
@-webkit-keyframes color {
0% { background-color: cyan; }
30% { background-color: green; }
50% { background-color: yellow }
70% { background-color: orchid; }
100% { background-color: royalBlue; }
}
@-moz-keyframes color {
0% { background-color: cyan; }
30% { background-color: green; }
50% { background-color: yellow; }
70% { background-color: orchid; }
100% { background-color: royalBlue; }
}
@keyframes color {
0% { background-color: cyan; }
30% { background-color: green; }
50% { background-color: yellow; }
70% { background-color: orchid; }
100% { background-color: royalBlue; }
}
纯CSS实现的背景渐变效果代码!
最新推荐文章于 2023-04-17 18:13:53 发布