css 文字光影特效

css 复制代码
 <style>
      .text-area{
          text-align: center;
      }
      span{
          font-weight: bold;
          font-size:70px;
          color:#faebd7;
          animation:shadowing 1s ease-in-out infinite alternate;
      }
      span:nth-child(n+2){
          animation-delay: 0.2s;
      }
      span:nth-child(n+3){
          animation-delay: 0.4s;
      }
      span:nth-child(n+4){
          animation-delay: 0.4s;
      }
      span:nth-child(n+5){
          animation-delay: 0.5s;
      }
      span:nth-child(n+6){
          animation-delay: 0.6s;
      }
      span:nth-child(n+7){
          animation-delay: 0.7s;
      }
      span:nth-child(n+8){
          animation-delay: 0.8s;
      }
      span:nth-child(n+9){
          animation-delay: 0.9s;
      }
      @keyframes shadowing {
          to{
              color:#ff020f;
              text-shadow: 20px 0 70px #ff020f;
          }

      }
  </style>
html 复制代码
<div class="text-area">
      <span>加</span>
      <span>加</span>
      <span>加</span>
      <span>加</span>
      <span>油</span>
      <span>未</span>
      <span>来</span>
      <span>可</span>
      <span>期</span>
 </div>
相关推荐
问道飞鱼37 分钟前
【前端知识】Vite用法从入门到实战
前端·vite·项目构建
爱上妖精的尾巴43 分钟前
8-10 WPS JSA 正则表达式:贪婪匹配
服务器·前端·javascript·正则表达式·wps·jsa
shadow fish2 小时前
react学习记录(三)
javascript·学习·react.js
小疙瘩2 小时前
element-ui 中 el-upload 多文件一次性上传的实现
javascript·vue.js·ui
Aliex_git2 小时前
浏览器 API 兼容性解决方案
前端·笔记·学习
独泪了无痕2 小时前
useStorage:本地数据持久化利器
前端·vue.js
程序员林北北2 小时前
【前端进阶之旅】JavaScript 一些常用的简写技巧
开发语言·前端·javascript
全栈前端老曹2 小时前
【Redis】Redis 持久化机制 RDB 与 AOF
前端·javascript·数据库·redis·缓存·node.js·全栈
NEXT062 小时前
受控与非受控组件
前端·javascript·react.js
NEXT063 小时前
防抖(Debounce)与节流(Throttle)解析
前端·javascript·面试