<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animate.css Example</title>
<!-- 引入 animate.css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
<style>
/* 自定义样式 */
.box {
width: 100px;
height: 100px;
background-color: red;
margin: 50px auto;
}
</style>
</head>
<body>
<!-- 动画元素 -->
<div class="box animated infinite bounce"></div>
<script>
// 解释说明:
// 1. 我们引入了 animate.css 库,它提供了丰富的预定义 CSS 动画效果。
// 2. 在 HTML 中,我们创建了一个 div 元素,并为其添加了 animate.css 提供的 "animated" 和 "bounce" 类。
// 3. "infinite" 类使得动画无限循环播放。
// 4. "bounce" 是一种弹跳效果,使元素在屏幕上弹跳。
</script>
</body>
</html>
上一篇:css
下一篇:css选择器
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站