Text automatic changing.

text

Text change from up to down and down to up.

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="style.css">
    <style type="text/css">
      body{
  margin: 0;
  padding: 0;
  font-family: montserrat,sans-serif;
  background: black;
}

.animated-text{
  color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  background: #2980b9;
  padding: 0 40px;
  height: 60px;
  overflow: hidden;
}

.line{
  text-transform: uppercase;
  text-align: center;
  font-size: 40px;
  line-height: 60px;
}

.line:first-child{
  animation: anim 12s infinite;
}

@keyframes anim {
  0%{
    margin-top: 0;
  }
  16%{
    margin-top: -60px;
  }
  33%{
    margin-top: -120px;
  }
  50%{
    margin-top: -180px;
  }
  66%{
    margin-top: -120px;
  }
  82%{
    margin-top: -60px;
  }
  100%{
    margin-top: 0;
  }
}

    </style>
  </head>
  <body>
    <div class="animated-text">
      <div class="line">Hi Guys</div>
      <div class="line">Heartly</div>
      <div class="line">Welcome To</div>
      <div class="line">Our site</div>

    </div>
  </body>
</html>