div+css实现文字波浪动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现文字波浪动画效果代码

代码标签: div css 文字 波浪 动画

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

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">

<style>
    @import url("https://fonts.googleapis.com/css?family=Muli");
*, *:before, *:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-size: 62.5%;
  background-color: #00091B;
  font-family: "Muli", Helvetica, sans-serif;
}

.container {
  position: absolute;
  width: 17rem;
  height: 10rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.text {
  color: #fff;
  font-size: 6rem;
  font-weight: 900;
  display: inline-block;
  position: absolute;
  bottom: 0;
  -webkit-animation: text 1050ms ease-in infinite;
          animation: text 1050ms ease-in infinite;
  transform: translatez(0);
}
.text-w {
  left: 0rem;
  transform: translate3d(0, -4rem, 0);
  -webkit-animation: text-w 1050ms ease-in infinite;
          animation: text-w 1050ms ease-in infinite;
}
.text-a {
  left: 5.4rem;
  -webkit-animation-delay: 150ms;
          animation-delay: 150ms;
}
.text-v {
  left: 9.6rem;
  -webkit-animation-delay: 230ms;
          animation-delay: 230ms;
}
.text-e {
  left: 13rem;
  -webkit-animation-delay: 310ms;
          animation-delay: 310ms;
}

.coast {
  position: absolute;
  left: 1.3rem;
  bottom: 1.7rem;
  width: 6.2rem;
  height: 2.2rem;
  display: inline-block;
  -webkit-animation: coast 2100ms linear infinite;
          animation: coast 2100ms linear infinite;
  transform: translateZ(0);
}

.wave-rel-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 3rem;
  perspective-origin: 0%, 50%;
}

.wave {
  position: absolute;
  width: 6.2rem;
  height: 2.2rem;
  border-radius: 1.1rem;
  background: radial-gradient(ellipse at center, #74f1fc 0%, #32e6ff 73%, #15c7fa 100%);
  display: inline-block;
  -webkit-animation: wave 2100ms linear infinite;
          animation: wave 2100ms linear infinite;
  will-change: width;
  transform: translateZ(0) scale(0);
}

.delay {
  -webkit-animation-delay: 1050ms;
          animation-delay: 1050ms;
}

@-webkit-keyframes text {
  0% {
    transform: translate3d(0, 0, 0);
  }
  30% {
    transform: translate3d(0, 0, 0);
  }
  45% {
    transform: translate3d(0, -4rem, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes text {
  0% {
    transform: translate3d(0, 0, 0);
  }
  30% {
    transform: translate3d(0, 0, 0);
  }
  45% {
    transform: translate3d(0, -4rem, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}
@-webkit-keyframes text-w {
  0% {
    transform: transl.........完整代码请登录后点击上方下载按钮下载查看

网友评论0