div+css实现文字路径无限循环动画代码

代码语言:html

所属分类:动画

代码描述:div+css实现文字路径无限循环动画代码,可点击右侧暂停或开始

代码标签: div css 文字 路径 无限 循环 动画 代码

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

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

<head>
  <meta charset="UTF-8">
  

  
  
  
<style>
body {
  margin: 0;
  background: #000;
  overflow: hidden;
  display: grid;
  height: 100vh;
  place-items: center;
  container-type: size;
}

.container {
  position: relative;
  display: flex;
  font-size: min(.9cqh, .45cqw);
  --h: 100em;
  height: var(--h);
  width: calc(2*var(--h) - 5.5em);
}

.wrapper {
  position: absolute;
  height: 100%;
  width: unset;
  aspect-ratio: 1;
  display: grid;


  &:nth-child(2 of .wrapper) {
    right: 0;
    bottom: unset;
  }

}

.swirl {
  position: absolute;
  inset: 0;
  --dur: 10s;
  display: grid;
  align-items: center;
  justify-items: unset;
  animation: spin var(--dur) linear infinite;

  :nth-child(2 of .wrapper) & { animation-direction: reverse; }
}

span {
  position: absolute;
  width: 50%;
  height: unset;
  color: #fff;
  font-family: monospace;
  font-weight: bold;
  font-size: .........完整代码请登录后点击上方下载按钮下载查看

网友评论0