div+css实现三维方块数字变动动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现三维方块数字变动动画效果代码

代码标签: div css 三维 方块 数字 变动 动画

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


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

<head>

  <meta charset="UTF-8">

  
  
<style>
*, *::before, *::after {
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

body {
  background-color: #111;
  color: #fff;
  min-height: 100vh;
  display: grid;
  place-items: center;
  perspective: 420px;
  background-image: radial-gradient(circle, #ddd, #ddd0 20em), conic-gradient(#7bf, #7fb, #b7f, #bf7, #f7b, #fb7, #7bf);
  overflow: hidden;
}
body::after, body::before {
  content: "";
  position: absolute;
  inset: -100%;
  background-image: repeating-conic-gradient(#fff1 0 10deg, #fff0 0 20deg, #fff1 0 40deg, #fff0 0 55deg);
  z-index: -1;
  -webkit-animation: ray infinite linear;
          animation: ray infinite linear;
  -webkit-animation-duration: 30s;
          animation-duration: 30s;
}
body::before {
  -webkit-animation-duration: 60s;
          animation-duration: 60s;
  animation-direction: reverse;
}
@-webkit-keyframes ray {
  to {
    rotate: 1turn;
  }
}
@keyframes ray {
  to {
    rotate: 1turn;
  }
}
body *:not(:empty) {
  transform-style: preserve-3d;
}

.outer {
  position: relative;
  font-size: 42px;
  -webkit-animation: swingX 12s -12s infinite ease-in-out alternate;
          animation: swingX 12s -12s infinite ease-in-out alternate.........完整代码请登录后点击上方下载按钮下载查看

网友评论0