[Vuejs]-Transition starts after page loaded

0👍

Change your style code

<style>
  .slide-left-enter,
  .slide-right-enter {
    width: 0 !important;
  }

  .slide-left-enter-to,
  .slide-right-enter-to {
    width: 400px !important;
  }

  header {
    background-color: #1b1d1f;
    height: 100vh;
    display: flex;
    justify-content: center;
  }

  header .contents {
    width: 400px;
    transition: all 2s;
    background-color: #151618;
    color: #fff;
  }
</style>

Leave a comment