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

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.

主站蜘蛛池模板: 临夏县| 铜川市| 石首市| 土默特右旗| 沁阳市| 松溪县| 周宁县| 抚顺县| 收藏| 志丹县| 扎囊县| 大悟县| 昌吉市| 婺源县| 静海县| 芒康县| 苏州市| 日喀则市| 胶州市| 宁德市| 罗田县| 龙山县| 饶阳县| 青田县| 成都市| 高雄县| 海宁市| 鱼台县| 甘谷县| 武强县| 杭锦旗| 香港 | 利川市| 成都市| 安图县| 武乡县| 阿坝| 汾阳市| 鹿泉市| 玛曲县| 都江堰市|