12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
- <script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
- <style>
- .bounce-enter-active {
- animation: bounce-in .5s;
- }
- .bounce-leave-active {
- animation: bounce-in .5s reverse;
- }
- @keyframes bounce-in {
- 0% {
- transform: scale(0);
- }
- 50% {
- transform: scale(1.5);
- }
- 100% {
- transform: scale(1);
- }
- }
- </style>
- </head>
- <body>
- <div id = "databinding">
- <button v-on:click = "show = !show">点我</button>
- <transition name="bounce">
- <p v-if="show">菜鸟教程 -- 学的不仅是技术,更是梦想!!!</p>
- </transition>
- </div>
- <script type = "text/javascript">
- new Vue({
- el: '#databinding',
- data: {
- show: true
- }
- })
- </script>
- </body>
- </html>
|