官术网_书友最值得收藏!

The overlay animation

Like we did with the hand, we will use a transition to animate the overlay.

  1. 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>
  1. 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.

主站蜘蛛池模板: 尉犁县| 南靖县| 平湖市| 井陉县| 巴林右旗| 吉林省| 海晏县| 桃江县| 平遥县| 西充县| 洛阳市| 饶阳县| 大荔县| 平原县| 洛阳市| 鄯善县| 民丰县| 融水| 遵化市| 奉新县| 大连市| 鄂州市| 错那县| 丹巴县| 拉孜县| 布拖县| 东丰县| 曲水县| 高淳县| 延安市| 平泉县| 凤山市| 江山市| 九寨沟县| 宽城| 黔西| 广平县| 介休市| 鄯善县| 常宁市| 金沙县|