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

本文介绍如何在HTML中使用动画效果,重点讲解了通过设置enter-active-class和leave-active-class类来触发元素进入和离开时的动画,并展示了如何在页面加载时就展示动画的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值