纯css打造炫酷2020变换动画特效

代码语言:html

所属分类:动画

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
:root {
  --duration: 5s;
  --ease: cubic-bezier(.6, 0, .2, 1);
}

* {
  position: relative;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

.digit {
  stroke-width: 30;
  -webkit-animation: var(--duration) var(--ease) both alternate infinite;
          animation: var(--duration) var(--ease) both alternate infinite;
  -webkit-animation-delay: calc( (var(--i) * 0.05s));
          animation-delay: calc( (var(--i) * 0.05s));
}
.digit circle,
.digit path {
  -webkit-animation: inherit;
          animation: inherit;
  stroke: var(--color);
  stroke-linejoin: round;
  stroke-linecap: round;
  /* Additional offsets for rounded stroke */
  str.........完整代码请登录后点击上方下载按钮下载查看

网友评论0