1. * {
    2. margin: 0;
    3. padding: 0;
    4. }
    5. .container {
    6. position: relative;
    7. width: 100%;
    8. height: 100vh;
    9. display: flex;
    10. justify-content: center;
    11. align-items: center;
    12. background-color: #000;
    13. }
    14. .circle {
    15. display: flex;
    16. justify-content: center;
    17. align-items: center;
    18. position: absolute;
    19. width: 200px;
    20. height: 200px;
    21. border-radius: 50%;
    22. /* border: 1px solid red; */
    23. /* 从下到上渐变,从蓝色开始渐变,到高度30%位置是紫色渐变开始,到高度60%是玫红色渐变开始,高度100%红色渐变*/
    24. background-image: linear-gradient(
    25. 0deg,
    26. rgb(47, 102, 255),
    27. rgb(153, 64, 255) 30%,
    28. rgb(238, 55, 255) 60%,
    29. rgb(255, 0, 76) 100%);
    30. animation: rotate .4s linear infinite;
    31. }
    32. /* 模糊 */
    33. .circle::before {
    34. content: "";
    35. position: absolute;
    36. width: 200px;
    37. height: 200px;
    38. border-radius: 50%;
    39. /* border: 1px solid red; */
    40. /* 从下到上渐变,从蓝色开始渐变,到高度30%位置是紫色渐变开始,到高度60%是玫红色渐变开始,高度100%红色渐变*/
    41. background-image: linear-gradient(
    42. 0deg,
    43. rgb(47, 102, 255),
    44. rgb(153, 64, 255) 30%,
    45. rgb(238, 55, 255) 60%,
    46. rgb(255, 0, 76) 100%
    47. );
    48. /* 函数将高斯模糊应用于输入图像 */
    49. filter: blur(35px);
    50. }
    51. /* 黑圈 */
    52. .circle::after {
    53. content: "";
    54. position: absolute;
    55. width: 150px;
    56. height: 150px;
    57. border-radius: 50%;
    58. background: #000;
    59. }
    60. span {
    61. position: absolute;
    62. color: #fff;
    63. }
    64. /* 添加动画 */
    65. @keyframes rotate {
    66. 0%{
    67. transform: rotate(0deg);
    68. }
    69. 100%{
    70. transform: rotate(360deg);
    71. }
    72. }
    1. <!DOCTYPE html>
    2. <html lang="en">
    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. <link rel="stylesheet" href="./yuan.css">
    8. <title>Document</title>
    9. </head>
    10. <body>
    11. <div class="container">
    12. <!-- <img src="./img/instruction/car1.png" width="100%" id="carOne" style="display: none;"> -->
    13. <div class="circle"></div>
    14. <span>流光球~</span>
    15. </div>
    16. </body>
    17. </html>