<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- <link href="https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css" rel="stylesheet"> -->
<link rel="stylesheet" href="./animate.css">
<style>
</style>
</head>
<body>
<!--
免费的cdn网站
https://www.bootcdn.cn/#about
-->
<div id="app">
<div id="msg">
<button @click="bool = !bool">按钮</button>
<!--
enter-active-class
leave-active-class
-->
<transition leave-active-class="animated rubberBand" enter-active-class="animated flash">
<h1 v-if="bool">{{msg}}</h1>
</transition>
</div>
</div>
<script src="../../vue.js"></script>
<script>
/*
vue 提供了 transition的封装组件
可以给任何组件添加进入/离开过渡
*/
const vm = new Vue({
data: {
msg: '天龙八部',
bool:true,
}
}).$mount("#app");
</script>
</body>
</html>
animate.css 一种css3动画的组件库
最新推荐文章于 2024-10-16 18:09:33 发布