css实现文字炫光显示动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现文字炫光显示动画效果代码

代码标签: 炫光 显示 动画 效果

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

<html>
<head>
    <style>
       *, *:before, *:after {
  box-sizing: border-box;
}

body {
  margin: 0;
  width: 100%;
  font-family: "Cutive Mono", monospace;
  line-height: 1.5;
  font-weight: 400;
  font-style: normal;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.sep {
  border: 0;
  width: 3em;
  height: 1px;
  margin: 1em 0;
  background-color: rgba(255, 255, 255, 0.4);
}

.mast {
  position: relative;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  width: 100%;
  height: 100vh;
  color: #fff;
  background-color: #111;
}
.mast:after {
  z-index: 0;
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(17, 17, 17, 0.9);
}
.mast > header {
  z-index: 2;
  position: relative;
}
.mast__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
  background-size: cover;
  background-position: 50%;
}
.mast__header {
  padding: 5%;
}
.mast__title {
  font-family: "Cutive Mono", monospace;
  font-size: 1em;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.mast__title span {
  -webkit-animation: letter-glow 0.7s 0s ease both;
          animation: letter-glow 0.7s 0s ease both;
}
.mast__title span:nth-child(1) {
  -webkit-animation-delay: 0.05s;
          animation-delay: 0.05s;
}
.mast__title span:nth-child(2) {
  -webkit-animation-delay: 0.1s;
          animation-delay: 0.1s;
}
.mast__title span:nth-child(3) {
  -webkit-animation-delay: 0.15s;
          animation-delay: 0.15s;
}
.mast__title span:nth-child(4) {
  -webkit-animation-delay: 0.2s;
          animation-delay: 0.2s;
}
.mast__title span:nth-child(5) {
  -webkit-animation-delay: 0.25s;
          animation-delay: 0.25s;
}
.mast__title span:nth-child(6) {
  -webkit-animation-delay: 0.3s;
          animation-delay: 0.3s;
}
.mast__title span:nth-child(7) {
  -webkit-animation-delay: 0.35s;
          animation-delay: 0.35s;
}
.mast__title span:nth-child(8) {
  -webkit-animation-delay: 0.4s;
          animation-delay: 0.4s;
}
.mast__title span:nth-child(9) {
  -webkit-animation-delay: 0.45s;
          animation-delay: 0.45s;
}
.mast__title span:nth-child(10) {
  -webkit-animation-delay: 0.5s;
          animation-delay: 0.5s;
}
.mast__title span:nth-child(11) {
  -webkit-animation-delay: 0.55s;
          animation-delay: 0.55s;
}
.mast__title span:nth-child(12) {
  -webkit-animation-delay: 0.6s;
          animation-delay: 0.6s;
}
.mast__title span:nth-child(13) {
  -webkit-animation-delay: 0.65s;
          animation-delay: 0.65s;
}
.mast__title span:nth-child(14) {
  -webkit-animation-delay: 0.7s;
          animation-delay: 0.7s;
}
.mast__title span:nth-child(15) {
  -webkit-animation-delay: 0.75s;
          animation-delay: 0.75s;
}
.mast__title span:nth-child(16) {
  -webkit-animation-delay: 0.8s;
          animation-delay: 0.8s;
}
.mast__title span:nth-child(17) {
  -webkit-animation-delay: 0.85s;
          animation-delay: 0.85s;
}
.mast__title span:nth-child(18) {
  -webkit-animation-delay: 0.9s;
          animation-delay: 0.9s;
}
.mast__title span:nth-child(19) {
  -webkit-animation-delay: 0.95s;
          animation-delay: 0.95s;
}
.mast__title span:nth-child(20) {
  -webkit-animation-delay: 1s;
          animation-delay: 1s;
}
.mast__title span:nth-child(21) {
  -webkit-animation-delay: 1.05s;
          animation-delay: 1.05s;
}
.mast__title span:nth-child(22) {
  -webkit-animation-delay: 1.1s;
          animation-delay: 1.1s;
}
.mast__title span:nth-child(23) {
  -webkit-animation-delay: 1.15s;
          animation-delay: 1.15s;
}
.mast__title span:nth-child(24) {
  -webkit-animation-delay: 1.2s;
          animation-delay: 1.2s;
}
.mast__title span:nth-child(25) {
  -webkit-animation-delay: 1.25s;
          animation-delay: 1.25s;
}
.mast__text {
  font-family: "Cutive Mono", monospace;
  font-size: 1em;
  margin: 0 0 0.5em;
  line-height: 1.5;
  white-space: pre;
}
.mast__text span {
  -webkit-animation: letter-glow 0.7s 0s ease both;
          animation: letter-glow 0.7s 0s ease both;
}
.mast__text span:nth-child(1) {
  -webkit-animation-delay: 0.05s;
          animation-delay: 0.05s;
}
.mast__text span:nth-child(2) {
  -webkit-animation-delay: 0.1s;
          animation-delay: 0.1s;
}
.mast__text span:nth-child(3) {
  -webkit-animation-delay: 0.15s;
          animation-delay: 0.15s;
}
.mast__text span:nth-child(4) {
  -webkit-animation-delay: 0.2s;
          animation-delay: 0.2s;
}
.mast__text span:nth-child(5) {
  -webkit-animation-delay: 0.25s;
          animation-delay: 0.25s;
}
.mast__text span:nth-child(6) {
  -webkit-animation-delay: 0.3s;
          animation-delay: 0.3s;
}
.mast__text span:nth-child(7) {
  -webkit-animation-delay: 0.35s;
          animation-delay: 0.35s;
}
.mast__text span:nth-child(8) {
  -webkit-animation-delay: 0.4s;
          animation-delay: 0.4s;
}
.mast__text span:nth-child(9) {
  -webkit-animation-delay: 0.45s;
          animation-delay: 0.45s;
}
.mast__text span:nth-child(10) {
  -webkit-animation-delay: 0.5s;
          animation-delay: 0.5s;
}
.mast__text span:nth-child(11) {
  -webkit-animation-delay: 0.55s;
          animation-delay: 0.55s;
}
.mast__text span:nth-child(12) {
  -webkit-animation-delay: 0.6s;
          animation-delay: 0.6s;
}
.mast__text span:nth-child(13) {
  -webkit-animation-delay: 0.65s;
          animation-delay: 0.65s;
}
.mast__text span:nth-child(14) {
  -webkit-animation-delay: 0.7s;
          animation-delay: 0.7s;
}
.mast__text span:nth-child(15) {
  -webkit-animation-delay: 0.75s;
          animation-delay: 0.75s;
}
.mast__text span:nth-child(16) {
  -webkit-animation-delay: 0.8s;
          animation-delay: 0.8s;
}
.mast__text span:nth-child(17) {
  -webkit-animation-delay: 0.85s;
          animation-delay: 0.85s;
}
.mast__text span:nth-child(18) {
  -webkit-animation-delay: 0.9s;
          animation-delay: 0.9s;
}
.mast__text span:nth-child(19) {
  -webkit-animation-delay: 0.95s;
          animation-delay: 0.95s;
}
.mast__text span:nth-child(20) {
  -webkit-animation-delay: 1s;
          animation-delay: 1s;
}
.mast__text span:nth-child(21) {
  -webkit-animation-delay: 1.05s;
          animation-delay: 1.05s;
}
.mast__text span:nth-child(22) {
  -webkit-animation-delay: 1.1s;
          animation-delay: 1.1s;
}
.mast__text span:nth-child(23) {
  -webkit-animation-delay: 1.15s;
          animation-delay: 1.15s;
}
.mast__text span:nth-child(24) {
  -webkit-animation-delay: 1.2s;
          animation-delay: 1.2s;
}
.mast__text span:nth-child(25) {
  -webkit-animation-delay: 1.25s;
          animation-delay: 1.25s;
}
.mast__text span:nth-child(26) {
  -webkit-animation-delay: 1.3s;
          animation-delay: 1.3s;
}
.mast__text span:nth-child(27) {
  -webkit-animation-delay: 1.35s;
          animation-delay: 1.35s;
}
.mast__text span:nth-child(28) {
  -webkit-animation-delay: 1.4s;
          animation-delay: 1.4s;
}
.mast__text span:nth-child(29) {
  -webkit-animation-delay: 1.45s;
          animation-delay: 1.45s;
}
.mast__text span:nth-child(30) {
  -webkit-animation-delay: 1.5s;
          animation-delay: 1.5s;
}
.mast__text span:nth-child(31) {
  -webkit-animation-delay: 1.55s;
          animation-delay: 1.55s;
}
.mast__text span:nth-child(32) {
  -webkit-animation-delay: 1.6s;
          animation-delay: 1.6s;
}
.mast__text span:nth-child(33) {
  -webkit-animation-delay: 1.65s;
          animation-delay: 1.65s;
}
.mast__text span:nth-child(34) {
  -webkit-animation-delay: 1.7s;
          animation-delay: 1.7s;
}
.mast__text span:nth-child(35) {
  -webkit-animation-delay: 1.75s;
          animation-delay: 1.75s;
}
.mast__text span:nth-child(36) {
  -webkit-animation-delay: 1.8s;
          animation-delay: 1.8s;
}
.mast__text span:nth-child(37) {
  -webkit-animation-delay: 1.85s;
          animation-delay: 1.85s;
}
.mast__text span:nth-child(38) {
  -webkit-animation-delay: 1.9s;
          animation-delay: 1.9s;
}
.mast__text span:nth-child(39) {
  -webkit-animation-delay: 1.95s;
          animation-delay: 1.95s;
}
.mast__text span:nth-child(40) {
  -webkit-animation-delay: 2s;
          animation-delay: 2s;
}
.mast__text span:nth-child(41) {
  -webkit-animation-delay: 2.05s;
          animation-delay: 2.05s;
}
.mast__text span:nth-child(42) {
  -webkit-animation-delay: 2.1s;
          animation-delay: 2.1s;
}
.mast__text span:nth-child(43) {
  -webkit-animation-delay: 2.15s;
          animation-delay: 2.15s;
}
.mast__text span:nth-child(44) {
  -webkit-animation-delay: 2.2s;
          animation-delay: 2.2s;
}
.mast__text span:nth-child(45) {
  -webkit-animation-delay: 2.25s;
          animation-delay: 2.25s;
}
.mast__text span:nth-child(46) {
  -webkit-animation-delay: 2.3s;
          animation-delay: 2.3s;
}
.mast__text span:nth-child(47) {
  -webkit-animation-delay: 2.35s;
          animation-delay: 2.35s;
}
.mast__text span:nth-child(48) {
  -webkit-animation-delay: 2.4s;
          animation-delay: 2.4s;
}
.mast__text span:nth-child(49) {
  -webkit-animation-delay: 2.45s;
          animation-delay: 2.45s;
}
.mast__text span:nth-child(50) {
  -webkit-animation-delay: 2.5s;
          animation-delay: 2.5s;
}
.mast__text span:nth-child(51) {
  -webkit-animation-delay: 2.55s;
          animation-delay: 2.55s;
}
.mast__text span:nth-child(52) {
  -webkit-animation-delay: 2.6s;
          animation-delay: 2.6s;
}
.mast__text span:nth-child(53) {
  -webkit-animation-delay: 2.65s;
          animation-delay: 2.65s;
}
.mast__text span:nth-child(54) {
  -webkit-animation-delay: 2.7s;
          animation-delay: 2.7s;
}
.mast__text span:nth-child(55) {
  -webkit-animation-delay: 2.75s;
          animation-delay: 2.75s;
}
.mast__text span:nth-child(56) {
  -webkit-animation-delay: 2.8s;
          animation-delay: 2.8s;
}
.mast__text span:nth-child(57) {
  -webkit-animation-delay: 2.85s;
          animation-delay: 2.85s;
}
.mast__text span:nth-child(58) {
  -webkit-animation-delay: 2.9s;
          animation-delay: 2.9s;
}
.mast__text span:nth-child(59) {
  -webkit-animation-delay: 2.95s;
          animation-delay: 2.95s;
}
.mast__text span:nth-child(60) {
  -webkit-animation-delay: 3s;
          animation-delay: 3s;
}
.mast__text span:nth-child(61) {
  -webkit-animation-delay: 3.05s;
          animation-delay: 3.05s;
}
.mast__text span:nth-child(62) {
  -webkit-animation-delay: 3.1s;
          animation-delay: 3.1s;
}
.mast__text span:nth-child(63) {
  -webkit-animation-delay: 3.15s;
          animation-delay: 3.15s;
}
.mast__text span:nth-child(64) {
  -webkit-animation-delay: 3.2s;
          animation-delay: 3.2s;
}
.mast__text span:nth-child(65) {
  -webkit-animation-delay: 3.25s;
          animation-delay: 3.25s;
}
.mast__text span:nth-child(66) {
  -webkit-animation-delay: 3.3s;
          animation-delay: 3.3s;
}
.mast__text span:nth-child(67) {
  -webkit-animation-delay: 3.35s;
          animation-delay: 3.35s;
}
.mast__text span:nth-child(68) {
  -webkit-animation-delay: 3.4s;
          animation-delay: 3.4s;
}
.mast__text span:nth-child(69) {
  -webkit-animation-delay: 3.45s;
          animation-delay: 3.45s;
}
.mast__text span:nth-child(70) {
  -webkit-animation-delay: 3.5s;
          animation-delay: 3.5s;
}
.mast__text span:nth-child(71) {
  -webkit-animation-delay: 3.55s;
          animation-delay: 3.55s;
}
.mast__text span:nth-child(72) {
  -webkit-animation-delay: 3.6s;
          animation-delay: 3.6s;
}
.mast__text span:nth-child(73) {
  -webkit-animation-delay: 3.65s;
          animation-delay: 3.65s;
}
.mast__text span:nth-child(74) {
  -webkit-animation-delay: 3.7s;
          animation-delay: 3.7s;
}
.mast__text span:nth-child(75) {
  -webkit-animation-delay: 3.75s;
          animation-delay: 3.75s;
}
.mast__text span:nth-child(76) {
  -webkit-animation-delay: 3.8s;
          animation-delay: 3.8s;
}
.mast__text span:nth-child(77) {
  -webkit-animation-delay: 3.85s;
          animation-delay: 3.85s;
}
.mast__text span:nth-child(78) {
  -webkit-animation-delay: 3.9s;
          animation-delay: 3.9s;
}
.mast__text span:nth-child(79) {
  -webkit-animation-delay: 3.95s;
          animation-delay: 3.95s;
}
.mast__text span:nth-child(80) {
  -webkit-animation-delay: 4s;
          animation-delay: 4s;
}
.mast__text span:nth-ch.........完整代码请登录后点击上方下载按钮下载查看

网友评论0