js+css实现文字渐变滚动效果代码

代码语言:html

所属分类:动画

代码描述:js+css实现文字渐变滚动效果代码

代码标签: 渐变 滚动 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<html>
<head>
<style>#page {
  align-items: center;
  background: linear-gradient(to top right, #fc737a 10%, #ff7c9d 65%, #ffc01a 125%);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: opacity 1s;
}

#phrase_box {
  display: flex;
  flex-flow: column;
  height: 150px;
  overflow: hidden;
  width: 260px;
}

#phrases {
  -webkit-animation: slide-phrases-upward 20s;
          animation: slide-phrases-upward 20s;
}

#footer {
  bottom: 30px;
  color: white;
  display: flex;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
}

@-webkit-keyframes slide-phrases-upward {
  0% {
    transform: translateY(0px);
  }
  5% {
    transform: translateY(-50px);
  }
  10% {
    transform: translateY(-100px);
  }
  15% {
    transform: translateY(-150px);
  }
  20% {
    transform: translateY(-200px);
  }
  25% {
    transform: translateY(-250px);
  }
  30% {
    transform: translateY(-300px);
  }
  35% {
    transform: translateY(-350px);
  }
  40% {
    transform: translateY(-400px);
  }
  45% {
    transform: translateY(-450px);
  }
  50% {
    transform: translateY(-500px);
  }
  55% {
    transform: translateY(-550px);
  }
  60% {
    transform: translateY(-600px);
  }
  65% {
    transform: translateY(-650px);
  }
  70% {
    transform: translateY(-700px);
  }
  75% {
    transform: translateY(-750px);
  }
  80% {
    transform: translateY(-800px);
  }
  85% {
    transform: translateY(-850px);
  }
  90% {
    transform: translateY(-900px);
  }
  95% {
    transform: translateY(-950px);
  }
  100% {
    transform: translateY(-1000px);
  }
}

@keyframes slide-phrases-upward {
  0% {
    transform: translateY(0px);
  }
  5% {
    transform: translateY(-50px);
  }
  10% {
    transform: translateY(-100px);
  }
  15% {
    transform: translateY(-150px);
  }
  20% {
    transform: translateY(-200px);
  }
  25% {
    transform: translateY(-250px);
  }
  30% {
    transform: translateY(-300px);
  }
  35% {
    transform: translateY(-350px);
  }
  40% {
    transform: translateY(-400px);
  }
  45% {
    transform: translateY(-450px);
  }
  50% {
    transform: translateY(-500px);
  }
  55% {
    transform: translateY(-550px);
  }
  60% {
    transform: translateY(-600px);
  }
  65% {
    transform: translateY(-650px);
  }
  70% {
    transform: translateY(-700px);
  }
  75% {
    transform: translateY(-750px);
  }
  80% {
    transform: translateY(-800px);
  }
  85% {
    transform: translateY(-850px);
  }
  90% {
    transform: translateY(-900px);
  }
  95% {
    transform: translateY(-950px);
  }
  100% {
    transform: translateY(-1000px);
  }
}
#loadingCheckCircleSVG-0 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: -1.5s;
          animation-delay: -1.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-1 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: -0.5s;
          animation-delay: -0.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-2 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 0.5s;
          animation-delay: 0.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-3 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 1.5s;
          animation-delay: 1.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-4 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 2.5s;
          animation-delay: 2.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-5 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 3.5s;
          animation-delay: 3.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-6 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 4.5s;
          animation-delay: 4.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-7 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 5.5s;
          animation-delay: 5.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-8 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 6.5s;
          animation-delay: 6.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-9 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 7.5s;
          animation-delay: 7.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-10 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 8.5s;
          animation-delay: 8.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-11 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 9.5s;
          animation-delay: 9.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-12 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 10.5s;
          animation-delay: 10.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-13 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 11.5s;
          animation-delay: 11.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-14 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 12.5s;
          animation-delay: 12.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-15 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 13.5s;
          animation-delay: 13.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-16 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 14.5s;
          animation-delay: 14.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-17 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 15.5s;
          animation-delay: 15.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-18 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 16.5s;
          animation-delay: 16.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-19 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 17.5s;
          animation-delay: 17.5s;
  fill: white;
  opacity: 0;
}

#loadingCheckCircleSVG-20 {
  -webkit-animation: fill-to-white 5000ms;
          animation: fill-to-white 5000ms;
  -webkit-animation-delay: 18.5s;
          animation-delay: 18.5s;
  fill: white;
  opacity: 0;
}

@-webkit-keyframes fill-to-white {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fill-to-white {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
#loadingCheckSVG-0 {
  -webkit-animation: fill-to-coral 5000ms;
          animation: fill-to-coral 5000ms;
  -webkit-animation-delay: -1.5s;
          animation-delay: -1.5s;
}

#loadingCheckSVG-1 {
  -webkit-animation: fill-to-coral 5000ms;
          animation: fill-to-coral 5000ms;
  -webkit-animation-delay: -0.5s;
          animation-delay: -0.5s;
}

#loadingCheckSVG-2 {
  -webkit-animation: fill-to-coral 5000ms;
          animation: fill-to-coral 5000ms;
  -webkit-animation-delay: 0.5s;
          animation-delay: 0.5s;
}

#loadingCheckSVG-3 {
  -webkit-animation: fill-to-coral 5000ms;
          animation: fill-to-coral 5000ms;
  -webkit-animation-delay: 1.5s;
          animation-delay: 1.5s;
}

#loadingCheckSVG-4 {
  -webkit-animation: fill-to-coral 5000ms;
          animation: fill-to-coral 5000ms;
  -webkit-animation-delay: 2.5s;
          animation-delay: 2.5s;
}

#loadingCheckSVG-5 {
  -webkit-animation: fill-to-coral 5000ms;
          animation: fill-to-coral 5000ms;
  -webkit-animation-delay: 3.5s;
          animation-delay: 3.5s;
}

#loadingCheckSVG-6 {
  -webkit-animation: fill-to-coral 5000ms;
          animation: fill-to-coral 5000ms;
  -webkit-animation-delay: 4.5s;
          animation-delay: 4.5s;
}

#loadingCheckSVG-7 {
  -webkit-animation: fill-to-coral 5000ms;
          animation: fill-to-coral 5.........完整代码请登录后点击上方下载按钮下载查看

网友评论0