Vue項目中使用Animate.cssdonghu動畫庫

#在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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章