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

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.

主站蜘蛛池模板: 印江| 阳原县| 峨眉山市| 龙井市| 霍山县| 名山县| 汪清县| 讷河市| 承德市| 扶绥县| 海盐县| 托里县| 威信县| 政和县| 盐山县| 巨野县| 红桥区| 乡宁县| 南昌县| 崇左市| 定州市| 新绛县| 绩溪县| 增城市| 嘉义市| 富锦市| 静安区| 渝中区| 财经| 黄山市| 婺源县| 濮阳县| 平乐县| 香港 | 海门市| 繁昌县| 江津市| 武胜县| 登封市| 珲春市| 北京市|