为了实现过渡的效果,如图:

Vue的transition过渡效果

 

 主要用到Vue 的 transition:

DOM结构部分:

<transition name="fade">
      <div class="detail" v-show="showDetail" @click="closeDetail"></div>
</transition>

样式部分:

.fade-enter-active,
  .fade-leave-active {
    // opacity: 1;
    // background: rgba(7, 17, 27, 0.8);
    transition: all 0.6s;
  }
  .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
    opacity: 0;
  }
  .detail {
    @include full_background();
    z-index: 11;
    backdrop-filter: blur(10px);
    background: rgba(7, 17, 27, 0.8);
  }

 

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2021-12-30
  • 2021-12-10
  • 2021-09-01
猜你喜欢
  • 2022-12-23
  • 2021-12-03
  • 2021-12-03
  • 2022-12-23
  • 2021-11-18
  • 2021-12-30
  • 2021-10-23
相关资源
相似解决方案