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

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.

主站蜘蛛池模板: 南康市| 吉安市| 德江县| 牡丹江市| 阿克苏市| 南川市| 明水县| 和田县| 桂阳县| 孟村| 新邵县| 镇远县| 天镇县| 老河口市| 马公市| 望都县| 永春县| 军事| 基隆市| 吴桥县| 成武县| 酉阳| 石嘴山市| 乌恰县| 鄂州市| 通海县| 吉木萨尔县| 大同县| 阿合奇县| 白银市| 乡城县| 盐边县| 察隅县| 丽江市| 雷山县| 桐城市| 六盘水市| 宜州市| 临海市| 东阳市| 双桥区|