- 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.
推薦閱讀
- ReSharper Essentials
- Learn to Create WordPress Themes by Building 5 Projects
- Learning Bayesian Models with R
- Java加密與解密的藝術(第2版)
- The React Workshop
- PHP編程基礎與實例教程
- INSTANT Yii 1.1 Application Development Starter
- Microsoft 365 Certified Fundamentals MS-900 Exam Guide
- Advanced UFT 12 for Test Engineers Cookbook
- Getting Started with Python
- Photoshop智能手機APP界面設計
- Java Web開發基礎與案例教程
- Building Web and Mobile ArcGIS Server Applications with JavaScript(Second Edition)
- Eclipse開發(學習筆記)
- Building Microservices with .NET Core 2.0(Second Edition)