动画放大缩小的效果出不来,谷歌浏览器

来源:5-2 在Vue中使用 animate.css 库

qq_狂风之中嘶吼_puxWY4

2018-10-11

	<style>
		@keyframes myfirstanimation {
			0% {
				transform: scale(0);
			}
			50% {
				transform: scale(5);
			}
			100% {
				transform: scale(1);
			}
		}
		.fade-enter-active {
			transform-origin: left center;
			animation: myfirstanimation 3s;
		}
		.fade-leave-active {
			transform-origin: left center;
			animation: myfirstanimation 3s reverse;
		}
	</style>
	<div id='root'>
		<transition name="fade">
			<span v-show='show'>Hello World!</span>
		</transition>	
		<button @click='show=!show'>切换</button>
	</div>
	时间是延迟了,但是放大缩小的效果没出来
写回答

1回答

Dell

2018-10-11

transition上面是要加一个appear的,你看看appear相关的内容介绍

0
0

Vue2.5-2.6-3.0开发去哪儿网App 零基础入门到实战

课程紧跟Vue3版本迭代,企业主流版本Vue2+Vue3全掌握

10726 学习 · 8205 问题

查看课程