splitting实现文字拉伸动画效果

代码语言:html

所属分类:动画

代码描述:splitting实现文字拉伸动画效果

代码标签: 拉伸 动画 效果

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/splitting.css">

<style>
/* Clear out these styles to start fresh or use this as a base! */
@import url("https://fonts.googleapis.com/css2?family=Notable&family=Oswald:wght@700&display=swap");
html {
  height: 100%;
  display: flex;
}

body {
  margin: auto;
}

html,
body {
  background: #00043c;
  color: #fff;
  font: normal 600 8vw/1 "Notable", sans-serif;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
}

.splitting .char {
  visibility: hidden;
}
.splitting .char::before, .splitting .char::after {
  visibility: visible;
  animation: slide-in 4s linear both infinite;
  animation-delay: calc((40ms * var(--char-index)));
  transform-origin: top center;
}
.splitting .char::before {
  animation-delay: calc(100ms + (40ms * var(--char-index))), calc(100ms + (80ms * var(--char-index)));
  animation-name: slide-in, colorize;
  animation-timing-function: linear, linear;
}

@keyframes slide-in {
  0%,
  50%,
  100% {
    transform: translateY(-150%) scaleY(4);
    animation-timing-function:.........完整代码请登录后点击上方下载按钮下载查看

网友评论0