anime实现6种炫酷文字悬浮动画效果代码

代码语言:html

所属分类:动画

代码描述:anime实现6种炫酷文字悬浮动画效果代码

代码标签: anime 6种 炫酷 文字 悬浮 动画

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

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

<head>
 
<meta charset="UTF-8">
 
 
<style>
body {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  font-family: "Noto Sans JP", sans-serif;
  font-kerning: none;
  font-variant-ligatures: none;
  text-rendering: optimizeSpeed;
}

main {
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  justify-content: center;
  container-type: inline-size;
}

article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  padding: 20px;
  container-type: inline-size;
  border-radius: 1cqw;
  background: #2A2A2A;
  color: #D0D0D0;
  transition: background-color .25s ease-out;
}

article:has(p) {
  /*justify-content: flex-start;*/
  align-items: flex-start;
}

article:hover {
  cursor: default;
  background: #303030;
}

article h2 {
  text-align: center;
  font-size: clamp(20px, 8cqw, 30px);
  will-change: transform;
}

.word-3d {
  perspective: 1000px;
  position: relative;
  transform-style: preserve-3d;
  transform-origin: 50% 50% 1rem;
}

.face {
  position: absolute;
  left: 0;
  opacity: 0;
}

.face-front {
  opacity: 1;
}

.face-bottom {
  top: 100%;
  transform-origin: 50% 0%;
  transfor.........完整代码请登录后点击上方下载按钮下载查看

网友评论0