Vue專案中使用Animate.cssdonghu動畫庫
阿新 • • 發佈:2018-12-30
#在HTML中怎樣使用
1.<link rel="stylesheet" href="js/animate.css">
<transition enter-active-class='animated bounce' leave-active-class='animated bounce' > <h1 v-show='show'>Hello Animate</h1> </transition> <button @click='head' type="button">start</button>
其中最主要的是enter-active-class(進入)和leave-active-class(離開)這兩個類後面必須加animated
如果需要在剛進入頁面的時候出現動畫
<transition appear enter-active-class='animated bounce' leave-active-class='animated bounce' appear-active-class='animated bounce' > <h1 v-show='show'>Hello Animate</h1> </transition> <button @click='head' type="button">start</button>
這個需要加入appear這個屬性和appear-active-class這個類動畫
作者:foucsdroid