• css 星星闪烁加载框


    今天带来的是普灵普灵的loader闪烁加载框

    效果如下
    在这里插入图片描述
    开源精神给我们带来了源码
    ,源码如下

    DOCTYPE html>
    <html lang="en">
    
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>star Particlestitle>
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
        integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
      <style>
        * {
          margin: 0;
          padding: 0;
          box-sizing: border-box;
        }
    
        body {
          display: flex;
          justify-content: center;
          align-items: center;
          min-height: 100vh;
          background-color: #131a1c;
        }
    
        .loader {
          position: relative;
          width: 300px;
          height: 300px;
          display: flex;
          justify-content: center;
          align-self: center;
          animation: animate-color 7.2s linear infinite;
        }
    
        .loader span {
          position: absolute;
          transform-origin: 150px;
          transform: translateX(-150px) rotate(calc(var(--i) * 30deg));
          filter: drop-shadow(0 0 5px #3cc2ff) drop-shadow(0 0 15px #3cc2ff) drop-shadow(0 0 30px #3cc2ff);
        }
    
        .loader span i {
          position: relative;
          color: #3cc2ff;
          animation: rotate-stars 2.4s linear infinite;
          animation-delay: calc(var(--i) * 0.2s);
        }
    
        .loader span::before {
          content: '\f005';
          position: absolute;
          font-family: fontAwesome;
          font-size: 0.75em;
          color: #131a1c;
          animation: rotate-particle 2.4s linear infinite;
          animation-delay: calc(var(--i) * -0.2s);
        }
    
        @keyframes rotate-stars {
          0% {
            transform: rotate(0deg) scale(0);
          }
    
          50% {
            transform: rotate(180deg) scale(3);
          }
    
          100% {
            transform: rotate(360deg) scale(0);
          }
        }
    
        @keyframes animate-color {
          0% {
            filter: hue-rotate(0deg);
          }
    
          100% {
            filter: hue-rotate(360deg);
          }
        }
    
        @keyframes rotate-particle {
          0% {
            scale: 1;
            opacity: 0;
            rotate: 0deg;
          }
    
          50% {
            scale: 1;
            opacity: 1;
            rotate: 180deg;
          }
    
          100% {
            scale: 0;
            opacity: 0;
            rotate: 360deg;
            filter: drop-shadow(-150px 0 #3cc2ff) drop-shadow(150px 0 #3cc2ff) drop-shadow(0 150px #3cc2ff) drop-shadow(0 -150px #3cc2ff);
          }
        }
      style>
    head>
    
    <body>
      <div class="loader">
        <span style="--i:1;"><i class="fa-solid fa-star">i>span>
        <span style="--i:2;"><i class="fa-solid fa-star">i>span>
        <span style="--i:3;"><i class="fa-solid fa-star">i>span>
        <span style="--i:4;"><i class="fa-solid fa-star">i>span>
        <span style="--i:5;"><i class="fa-solid fa-star">i>span>
        <span style="--i:6;"><i class="fa-solid fa-star">i>span>
        <span style="--i:7;"><i class="fa-solid fa-star">i>span>
        <span style="--i:8;"><i class="fa-solid fa-star">i>span>
        <span style="--i:9;"><i class="fa-solid fa-star">i>span>
        <span style="--i:10;"><i class="fa-solid fa-star">i>span>
        <span style="--i:11;"><i class="fa-solid fa-star">i>span>
        <span style="--i:12;"><i class="fa-solid fa-star">i>span>
      div>
    body>
    
    html>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
  • 相关阅读:
    每日刷题Day8
    Gradle (史上最全): 5W字文
    Web3 游戏周报(6.23 - 6.29)
    《Beginning C++20 From Novice to Professional》第六章 Pointers and References
    全面横扫:dlib Python API在Linux和Windows的配置方案
    虹科分享 | 近距离接触最新的3个勒索软件
    如何使用JMeter操作Elasticsearch
    Zookeeper系列文章—入门
    腾讯云阿里云云服务器 Linux 操作系统 BT 宝塔面板快速建站教程
    Nested嵌套对象类型还挺实用
  • 原文地址:https://blog.csdn.net/weixin_44368963/article/details/133805878