css animation infinite
时间: 2023-10-20 10:36:59 浏览: 104
css animation贝塞尔曲线运动模拟
CSS animations can be made infinite by using the `infinite` keyword in the animation property. Here is an example:
```css
@keyframes myAnimation {
0% {
/* initial styles */
}
100% {
/* final styles */
}
}
.element {
animation: myAnimation 2s infinite;
}
```
In this example, the `myAnimation` keyframe animation is set to run for 2 seconds and repeat infinitely. You can adjust the animation duration and styles according to your needs.
阅读全文