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

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.

主站蜘蛛池模板: 凯里市| 莆田市| 富川| 东阿县| 韩城市| 顺平县| 鄂伦春自治旗| 思茅市| 碌曲县| 新竹市| 青铜峡市| 大埔区| 平罗县| 南郑县| 梅州市| 灵丘县| 满洲里市| 平度市| 舟曲县| 泉州市| 囊谦县| 永吉县| 江口县| 南汇区| 淮滨县| 彭山县| 河曲县| 金乡县| 新竹县| 石景山区| 休宁县| 乌海市| 鸡西市| 博爱县| 苍溪县| 堆龙德庆县| 浦江县| 上杭县| 石首市| 大洼县| 五常市|