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

本文详细介绍如何在HTML中使用动画效果,通过添加特定的类名和属性,如enter-active-class和leave-active-class,来实现元素的进入和离开动画。此外,还介绍了如何在页面加载时即刻展示动画,只需加入appear属性及相应的类名即可。

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

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值