Vue动画--同时使用过渡和动画
code: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Vue中同时使用过渡和动画</title> <script type="text/javascript" src="js/vue.js" ></script> <link rel="stylesheet" href="css/animate.css" /> <style> .fade-enter,.fade-leave-to{ opacity: 0; } .fade-enter-active,.fade-leave-active{ transition: opacity 3s; } </style> </head> <body> <div id="root"> <!--appear 自定义--> <!--appear 定义刷新页面的动画--> <!--:duration="5000" 自定义时间长短,直接写时间--> <transition :duration="{enter:5000,leave:3000}" name="fade" enter-active-class="animated swing fade-enter-active" leave-active-class="animated shake fade-leave-active"