css+div实现文字段落三维摇摆动画效果代码

代码语言:html

所属分类:动画

代码描述:css+div实现文字段落三维摇摆动画效果代码

代码标签: css div 文字 段落 三维 摇摆 动画

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


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

<head>

  <meta charset="UTF-8">
  


<link href="https://fonts.googleapis.com/css2?family=Abril+Fatface&display=swap" rel="stylesheet">
  
  
  
<style>
html, body, .container {
  height: 100%;
  overflow: hidden;
}

body {
  background: black;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent), linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px), #000a0f;
  box-shadow: inset 0 0 10em rgba(0, 0, 0, 0.5), 0 0 1em rgba(0, 0, 0, 0.8);
  font-family: "Abril Fatface", cursive;
  font-weight: 700;
  color: #fff;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  perspective: 1000px;
  perspective-origin: 50% 50%;
}
.container > div {
  margin: 2px;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: url(//repo.bfw.wiki/bfwrepo/image/63c26ad3d3b20.png);
  mix-blend-mode: hue;
  background-size: auto;
  background-attachment: unset;
  background-position: 0%;
  transform: translate3d(0, 0, 0) rotateY(35deg);
  animation: swing 4s ease-in-out infinite, texteffect 50s;
}
.container > div:nth-of-type(1) {
  animation-delay: 0.2s;
}
.container > div:nth-of-type(2) {
  animation-delay: 0.4s;
}
.container > div:nth-of-type(3) {
  animation-delay: 0.6s;
}
.container > div:nth-of-type(4) {
  animation-delay: 0.8s;
}
.container > div:nth-of-type(5) {
  animation-delay: 1s;
}
.container > div:nth-of-type(6) {
  animation-delay: 1.2s;
}
.container > div:nth-of-type(7) {
  animation-delay: 1.4s;
}
.container > div:nth-of-type(8) {
  animation-delay: 1.6s;
}
.container > div:nth-of-type(9) {
  animation-delay: 1.8s;
}
.container > div:nth-of-type(10) {
  animation-delay: 2s;
}
.container > div:nth-of-type(11) {
  animation-delay: 2.2s;
}
.container > div:nth-of-type(12) {
  animation-delay:.........完整代码请登录后点击上方下载按钮下载查看

网友评论0