Vue项目中使用Animate.cssdonghu动画库

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/focusdroid/article/details/85252559

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

猜你喜欢

转载自blog.csdn.net/focusdroid/article/details/85252559