CSS3荧光灯文字闪烁动画

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>CSS3荧光灯文字闪烁动画</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      .text-effect {
        background: #2c2c54;
        color: #fff;
        font-family: "Monoton", cursive;
        font-size: 100px;
        font-weight: 700;
        text-transform: uppercase;
        text-align: center;
        margin: 0 auto;
        display: block;
        position: relative;
      }
      .text-effect span {
        animation: animate linear 2000ms infinite;
      }
      .text-effect span:nth-child(1n) {
        animation-delay: 0s;
      }
      .text-effect span:nth-child(2n) {
        animation-delay: 100ms;
      }
      .text-effect span:nth-child(3n) {
        animation-delay: 200ms;
      }
      .text-effect span:nth-child(4n) {
        animation-delay: 300ms;
      }
      .text-effect span:nth-child(5n) {
        animation-delay: 400ms;
      }
      .text-effect span:nth-child(6n) {
        animation-delay: 500ms;
      }
      .text-effect span:nth-child(7n) {
        animation-delay: 600ms;
      }
      .text-effect span:nth-child(8n) {
        animation-delay: 700ms;
      }
      .text-effect span:nth-child(9n) {
        animation-delay: 800ms;
      }
      .text-effect span:nth-child(10n) {
        animation-delay: 900ms;
      }
      @keyframes animate {
        0% {
          opacity: 0.3;
        }
        100% {
          opacity: 1;
          text-shadow: 0 0 80px Red, 0 0 30px orange, 0 0 6px DarkRed;
        }
      }
      @media only screen and (max-width: 990px) {
        .text-effect {
          font-size: 65px;
        }
      }
      @media only screen and (max-width: 767px) {
        .text-effect {
          font-size: 50px;
        }
      }
      @media only screen and (max-width: 479px) {
        .text-effect {
          font-size: 36px;
        }
      }
      @media only screen and (max-width: 359px) {
        .text-effect {
          font-size: 27px;
        }
      }
    </style>
  </head>
  <body>
    <div class="text-effect">
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
    </div>
  </body>
</html>

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值