【CSS】How to animate scroll down bar gloss using @keyframes(Demo page)

※Please check using Developer tools

SCROLL

Sponsored links

CSS

.block {
  position: relative;
  height: 500px;
  margin: 70px auto 0;
  background: #000;
}

.scroll {
  position: absolute;
  left: 50%;
  bottom: -65px;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll p {
  color: #fff;
  font-size: 12px;
  line-height: 1;
  margin-bottom: 10px;
}

.scroll span {
  position: relative;
  display: block;
  width: 1px;
  height: 130px;
  overflow: hidden;
  margin: 0 auto;
  background: linear-gradient(to bottom, #7b1216 0%, #7b1216 50%, #9192c0 50%, #9192c0 100%);
}

.scroll span:before {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  content: "";
  width: 1px;
  height: 25px;
  margin: 0 auto;
  background: #f8f5f2;
  animation: anim 1.5s ease 0s infinite;
}

@keyframes anim {
  0% {
    top: -100%;
  }

  100% {
    top: 100%;
  }
}