好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

animate。css 时间设置

animate.css 是一个著名的 CSS 动画库,通过它,我们可以很方便地实现各种动画效果。在 animate.css 中,时间设置是非常重要的部分,也是掌握 animate.css 动画效果的关键所在。

时间设置有两种方式,一种是使用默认的动画时间,另一种是自定义动画时间。

// 使用默认的动画时间
.animation {
animation: fadeIn; // 默认时间为 1s
}
// 自定义动画时间
.animation {
animation: fadeIn 2s; // 动画时间为 2s
}

在自定义动画时间时,我们可以给出一个数字,表示动画的时间长度。我们还可以给出两个数字,第一个数字表示动画时间长度,第二个数字表示动画的延迟时间。

// 动画时间为 3s,延迟时间为 1s
.animation {
animation: fadeIn 3s 1s;
}

除了上述基本的动画时间设置,还有一个特殊的 "infinite" 关键字,可以让动画无限循环。

// 无限循环的动画
.animation {
animation: pulse infinite;
}

通过上述的时间设置方式,我们可以轻松实现 animate.css 动画库中各式各样的动画效果。

查看更多关于animate。css 时间设置的详细内容...

  阅读:78次

上一篇: 12px兼容css

下一篇:1920大图片中css