- Vue.js 2 Web Development Projects
- Guillaume Chau
- 68字
- 2021-07-02 22:34:35
The overlay animation
Like we did with the hand, we will use a transition to animate the overlay.
- Add a transition called "zoom" around the overlay component:
<transition name="zoom">
<overlay v-if="activeOverlay">
<component :is="'overlay-content-' + activeOverlay"
:player="currentPlayer" :opponent="currentOpponent"
:players="players" />
</overlay>
</transition>
- Add the following CSS rules in the transition.css file:
.zoom-enter-active,
.zoom-leave-active {
transition: opacity .3s, transform .3s;
}
.zoom-enter,
.zoom-leave-to {
opacity: 0;
transform: scale(.7);
}
This is a simple animation that will zoom out the overlay while fading it out.
推薦閱讀
- scikit-learn Cookbook
- Windows系統管理與服務配置
- Designing Hyper-V Solutions
- Oracle BAM 11gR1 Handbook
- 精通Python自然語言處理
- Learning Network Forensics
- Linux操作系統基礎案例教程
- Mastering Unity 2D Game Development(Second Edition)
- Illustrator CC平面設計實戰從入門到精通(視頻自學全彩版)
- Node.js區塊鏈開發
- Java程序設計教程
- Instant Automapper
- Go語言入門經典
- IBM RUP參考與認證指南
- Ionic3與CodePush初探:支持跨平臺與熱更新的App開發技術