fade(淡入淡出),大概是最多見的:javascript
.fade-enter-active, .fade-leave-active { transition: opacity .3s; } .fade-enter, .fade-leave-active { opacity: 0; }
vue-hackernews 翻頁:css
.slide-left-enter, .slide-right-leave-to { opacity: 0; transform: translate(-30px, 0); } .slide-left-leave-to, .slide-right-enter { opacity: 0; transform: translate(-30px, 0); }
btn :vue
<template> <div> <transition-group tag="div" name="btn"> <button key="1">a</button> <button key="2">b</butotn> </transition-group> </div> <template> <style> .btn-enter-active, .btn-leave-active { transition: all .5s; } .btn-enter, .btn-leave-active { opacity: 0; transform: translateX(30px); } .btn-move { transition: all .5s; } .btn-leave-active { position: absolute; } </style>
用於麪包屑:java
列表方式提供了5種方式 https://github.com/jkchao/vue... git