<template>
  <div class="wind">
    <div v-for="i in 10" :key="i" class="line"></div>
  </div>
</template>

<style lang="scss" scoped>
  .wind {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .line {
    position: absolute;
    width: 2px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    animation: blow 3s linear infinite;
  }

  @keyframes blow {
    0% {
      transform: translateX(0);
      opacity: 0;
    }
    50% {
      opacity: 1;
    }
    100% {
      transform: translateX(500px);
      opacity: 0;
    }
  }

  .line:nth-child(1) {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
  }
  .line:nth-child(2) {
    top: 20%;
    left: -10%;
    animation-delay: 0.5s;
  }
  .line:nth-child(3) {
    top: 30%;
    left: -10%;
    animation-delay: 1s;
  }
  .line:nth-child(4) {
    top: 40%;
    left: -10%;
    animation-delay: 1.5s;
  }
  .line:nth-child(5) {
    top: 50%;
    left: -10%;
    animation-delay: 2s;
  }
  .line:nth-child(6) {
    top: 60%;
    left: -10%;
    animation-delay: 2.5s;
  }
  .line:nth-child(7) {
    top: 70%;
    left: -10%;
    animation-delay: 3s;
  }
  .line:nth-child(8) {
    top: 80%;
    left: -10%;
    animation-delay: 3.5s;
  }
  .line:nth-child(9) {
    top: 90%;
    left: -10%;
    animation-delay: 4s;
  }
  .line:nth-child(10) {
    top: 100%;
    left: -10%;
    animation-delay: 4.5s;
  }
</style>
