前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >html5动态文字特效,文字动画特效

html5动态文字特效,文字动画特效

原创
作者头像
季春二九
发布2023-07-16 00:47:40
5140
发布2023-07-16 00:47:40
举报
文章被收录于专栏:季春二九
代码语言:javascript
复制
<!DOCTYPE html>    
<html lang="en" >    
<head>    
<meta charset="UTF-8">    
<title>html5动态文字特效,文字动画特效</title>    
<meta name="viewport" content="width=device-width, initial-scale=1">    
<meta charset="utf-8">    
<link href="https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">    
<style>
body {
  font-family: "Archivo Black", sans-serif;
  background: #f4d03f;
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: center;
  align-items: center;
}

.words {
  color: #f4d03f;
  font-size: 0;
  line-height: 1.5;
}

.words span {
  font-size: 5rem;
  display: inline-block;
  animation: move 3s ease-in-out infinite;
}

@keyframes move {
  0% {
    transform: translate(-30%, 0);
  }
  50% {
    text-shadow: 0 25px 50px rgba(0, 0, 0, 0.75);
  }
  100% {
    transform: translate(30%, 0);
  }
}

.words span:nth-child(2) {
  animation-delay: 0.5s;
}

.words span:nth-child(3) {
  animation-delay: 1s;
}

.words span:nth-child(4) {
  animation-delay: 1.5s;
}

.words span:nth-child(5) {
  animation-delay: 2s;
}

.words span:nth-child(6) {
  animation-delay: 2.5s;
}

.words span:nth-child(7) {
  animation-delay: 3s;
}
</style>
</head>    
<body>    
<!-- partial:index.partial.html -->    
<div class="words word-1">    
<span>L</span>    
<span>z</span>    
<span>x</span>    
<span>B</span>    
<span>l</span>    
<span>o</span>    
<span>g</span>    
</div>    
<div class="words word-2">    
<span>I</span>    
<span>S</span>    
</div>    
<div class="words word-3">    
<span>C</span>    
<span>O</span>    
<span>O</span>    
<span>L</span>    
</div>    
<!-- partial -->    
</body>    
</html>

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
作者已关闭评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档