<div class="food">
<button @click="show=!show">show</button>
<transition name="move">
<p v-show="show">hello</p>
</transition>
</div>
 
 
 
.move-enter{
max-height: 0;
}
.move-enter-active {
max-height: 480px;
-webkit-transition: max-height .5s cubic-bezier(1.0, 0.5, 0.8, 1.0);
transition: max-height .5s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
.move-leave {
max-height: 0;
}
.move-leave-active {
max-height: 0;
-webkit-transition: max-height .5s cubic-bezier(1.0, 0.5, 0.8, 1.0);
transition: max-height .5s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
posted on 2018-11-15 19:50  阿梅M  阅读(433)  评论(0编辑  收藏  举报