#container{ animation-name: anim1; animation-direction: alternate; animation-timing-function: linear; animation-delay: 0s; animation-iteration-count: infinite; animation-duration: 10s; } @keyframes anim1{ 0% { background-color: #1f99f6; } 25% { background-color: #45e761; } 50% { background-color: #cff622; } 75% { background-color: #f6a755; } 100% { background-color: #d065f5; } }
效果大概这样

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/209321.html原文链接:https://javaforall.net
