• 实现Loading倒影效果-webkit-box-reflect


    1. html>
    2. <html lang="zh-CN">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    7. <title>loading倒影效果title>
    8. head>
    9. <body>
    10. <div class="container">
    11. <span>Loading...span>
    12. <div class="circle">
    13. <div class="ring">div>
    14. div>
    15. div>
    16. body>
    17. html>
    18. <style>
    19. * {
    20. margin: 0;
    21. padding: 0;
    22. box-sizing: border-box;
    23. }
    24. body {
    25. height: 100vh;
    26. display: flex;
    27. justify-content: center;
    28. align-items: center;
    29. background-color: rgb(7, 15, 26);
    30. }
    31. .container {
    32. position: relative;
    33. height: 150px;
    34. width: 250px;
    35. -webkit-box-reflect: below 1px linear-gradient(transparent, rgb(7, 15, 26));
    36. }
    37. .container>span {
    38. position: absolute;
    39. left: 50%;
    40. top: 50%;
    41. transform: translate(-50%, -50%);
    42. color: rgb(20, 129, 202);
    43. text-shadow: 0 0 10px rgb(20, 129, 202),
    44. 0 0 30px rgb(20, 129, 202),
    45. 0 0 60px rgb(20, 129, 202),
    46. 0 0 100px rgb(20, 129, 202);
    47. font-size: 18px;
    48. z-index: 1;
    49. }
    50. .circle {
    51. position: relative;
    52. margin: 0 auto;
    53. height: 150px;
    54. width: 150px;
    55. background-color: rgb(13, 10, 37);
    56. border-radius: 50%;
    57. animation: zhuan 2s linear infinite;
    58. }
    59. @keyframes zhuan {
    60. 0% {
    61. transform: rotate(0deg);
    62. }
    63. 100% {
    64. transform: rotate(360deg);
    65. }
    66. }
    67. .circle::after {
    68. content: '';
    69. position: absolute;
    70. top: 10px;
    71. left: 10px;
    72. right: 10px;
    73. bottom: 10px;
    74. background-color: rgb(7, 15, 26);
    75. border-radius: 50%;
    76. }
    77. .ring {
    78. position: absolute;
    79. top: 0;
    80. left: 0;
    81. width: 75px;
    82. height: 150px;
    83. background-image: linear-gradient(180deg, rgb(22, 121, 252), transparent 80%);
    84. border-radius: 75px 0 0 75px;
    85. }
    86. .ring::after {
    87. content: '';
    88. position: absolute;
    89. right: -5px;
    90. top: -2.5px;
    91. width: 15px;
    92. height: 15px;
    93. background-color: rgb(40, 124, 202);
    94. box-shadow: 0 0 5px rgb(40, 151, 202),
    95. 0 0 10px rgb(40, 124, 202),
    96. 0 0 20px rgb(40, 124, 202),
    97. 0 0 30px rgb(40, 124, 202),
    98. 0 0 40px rgb(40, 124, 202),
    99. 0 0 50px rgb(40, 124, 202),
    100. 0 0 60px rgb(40, 124, 202),
    101. 0 0 60px rgb(40, 124, 202);
    102. border-radius: 50%;
    103. z-index: 1;
    104. }
    105. style>

    最终效果:

    https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d2fa6e0939d6419ab1a8e0b59b6bf8de~tplv-k3u1fbpfcp-zoom-in-crop-mark:3024:0:0:0.awebp

     

  • 相关阅读:
    【android】install android NDK
    kr 第三阶段(一)16 位汇编
    Pruning Pre-trained Language Models Without Fine-Tuning
    【SpringBoot】| SpringBoot 集成 Redis
    Mysql之部分表主从搭建及新增表
    K3S系列文章-使用AutoK3s在腾讯云上安装高可用K3S集群
    分布式软件架构——SOA架构/微服务架构/无服务架构
    解锁 OpenAI 密钥的新利器:OpenAI Key 有效性查询工具,支持GPT4
    目标检测论文、代码、数据集汇总
    RT-Thread 组件学习
  • 原文地址:https://blog.csdn.net/zx11_11/article/details/126164246