• 【 css动画 】—— 把你喜欢css动画嵌入到浏览器中


    项目前期回顾

    ​回顾  前期  

    你真的会使用 《断点》 吗_0.活在风浪里的博客-CSDN博客业务中使用 断点(break on)必然快速找到问题https://blog.csdn.net/m0_57904695/article/details/127634408?spm=1001.2014.3001.5501     

    目录

     效果图

     按钮相关

     荧光按钮

    流光按钮 

    hover渐变 按钮

    跑马灯 按钮

     下载按钮(带下载动画)

    下一步按钮(带动画)

     边框线滑动 按钮

    下载按钮

    hover 对角聚中 按钮 

     hover 折角按钮

     动画提示 按钮

    流光按钮:

    跑马灯 

    loading相关

    经典loading

    荧光文字loading

    方块弹性旋转loading

    阶梯 loading

    手机端 loading

    经典loading

    杠杆loading

    齿轮loading

    流线边框

    计算机 

     齿轮loading

    3D 旋转魔方 

    新年快乐 大灯笼

    闪动 呼吸灯

     扫描 效果

    打赏动画 

    黑夜白天切换

    模块选择

     


     效果图

    效果图过多不在一一展示 代码开始

     按钮相关

     荧光按钮

    1. 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. <title>发光按钮title>
    8. head>
    9. <style>
    10. body{
    11. background-color: #000;
    12. }
    13. button {
    14. --glow-color: rgb(217, 176, 255);
    15. --glow-spread-color: rgba(191, 123, 255, 0.781);
    16. --enhanced-glow-color: rgb(231, 206, 255);
    17. --btn-color: rgb(100, 61, 136);
    18. border: .25em solid var(--glow-color);
    19. padding: 1em 3em;
    20. color: var(--glow-color);
    21. font-size: 15px;
    22. font-weight: bold;
    23. background-color: var(--btn-color);
    24. border-radius: 1em;
    25. outline: none;
    26. -webkit-box-shadow: 0 0 1em .25em var(--glow-color),
    27. 0 0 4em 1em var(--glow-spread-color),
    28. inset 0 0 .75em .25em var(--glow-color);
    29. box-shadow: 0 0 1em .25em var(--glow-color),
    30. 0 0 4em 1em var(--glow-spread-color),
    31. inset 0 0 .75em .25em var(--glow-color);
    32. text-shadow: 0 0 .5em var(--glow-color);
    33. position: relative;
    34. -webkit-transition: all 0.3s;
    35. transition: all 0.3s;
    36. }
    37. button::after {
    38. pointer-events: none;
    39. content: "";
    40. position: absolute;
    41. top: 120%;
    42. left: 0;
    43. height: 100%;
    44. width: 100%;
    45. background-color: var(--glow-spread-color);
    46. -webkit-filter: blur(2em);
    47. filter: blur(2em);
    48. opacity: .7;
    49. -webkit-transform: perspective(1.5em) rotateX(35deg) scale(1, .6);
    50. transform: perspective(1.5em) rotateX(35deg) scale(1, .6);
    51. }
    52. button:hover {
    53. color: var(--btn-color);
    54. background-color: var(--glow-color);
    55. -webkit-box-shadow: 0 0 1em .25em var(--glow-color),
    56. 0 0 4em 2em var(--glow-spread-color),
    57. inset 0 0 .75em .25em var(--glow-color);
    58. box-shadow: 0 0 1em .25em var(--glow-color),
    59. 0 0 4em 2em var(--glow-spread-color),
    60. inset 0 0 .75em .25em var(--glow-color);
    61. }
    62. button:active {
    63. -webkit-box-shadow: 0 0 0.6em .25em var(--glow-color),
    64. 0 0 2.5em 2em var(--glow-spread-color),
    65. inset 0 0 .5em .25em var(--glow-color);
    66. box-shadow: 0 0 0.6em .25em var(--glow-color),
    67. 0 0 2.5em 2em var(--glow-spread-color),
    68. inset 0 0 .5em .25em var(--glow-color);
    69. }
    70. style>
    71. <body>
    72. <button> Button button>
    73. body>
    74. html>

    流光按钮 

    1. 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. <title>流光按钮title>
    8. head>
    9. <style>
    10. body {
    11. background-color: #000;
    12. }
    13. button {
    14. --green: #1BFD9C;
    15. font-size: 15px;
    16. padding: 0.7em 2.7em;
    17. letter-spacing: 0.06em;
    18. position: relative;
    19. font-family: inherit;
    20. border-radius: 0.6em;
    21. overflow: hidden;
    22. -webkit-transition: all 0.3s;
    23. transition: all 0.3s;
    24. line-height: 1.4em;
    25. border: 2px solid var(--green);
    26. background: -webkit-gradient(linear, left top, right top, color-stop(1%, rgba(27, 253, 156, 0.1)), color-stop(40%, transparent), color-stop(60%, transparent), to(rgba(27, 253, 156, 0.1)));
    27. background: linear-gradient(to right, rgba(27, 253, 156, 0.1) 1%, transparent 40%, transparent 60%, rgba(27, 253, 156, 0.1) 100%);
    28. color: var(--green);
    29. -webkit-box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.4), 0 0 9px 3px rgba(27, 253, 156, 0.1);
    30. box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.4), 0 0 9px 3px rgba(27, 253, 156, 0.1);
    31. }
    32. button:hover {
    33. color: #82ffc9;
    34. -webkit-box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.6), 0 0 9px 3px rgba(27, 253, 156, 0.2);
    35. box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.6), 0 0 9px 3px rgba(27, 253, 156, 0.2);
    36. }
    37. button:before {
    38. content: "";
    39. position: absolute;
    40. left: -4em;
    41. width: 4em;
    42. height: 100%;
    43. top: 0;
    44. -webkit-transition: -webkit-transform .4s ease-in-out;
    45. transition: -webkit-transform .4s ease-in-out;
    46. transition: transform .4s ease-in-out;
    47. transition: transform .4s ease-in-out, -webkit-transform .4s ease-in-out;
    48. background: -webkit-gradient(linear, left top, right top, color-stop(1%, transparent), color-stop(40%, rgba(27, 253, 156, 0.1)), color-stop(60%, rgba(27, 253, 156, 0.1)), to(transparent));
    49. background: linear-gradient(to right, transparent 1%, rgba(27, 253, 156, 0.1) 40%, rgba(27, 253, 156, 0.1) 60%, transparent 100%);
    50. }
    51. button:hover:before {
    52. -webkit-transform: translateX(15em);
    53. -ms-transform: translateX(15em);
    54. transform: translateX(15em);
    55. }
    56. style>
    57. <body>
    58. <button> 流光按钮button>
    59. body>
    60. html>

    hover渐变 按钮

    1. 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. <title>渐变title>
    8. head>
    9. <style>
    10. body {
    11. background-color: #fff;
    12. }
    13. button {
    14. -webkit-box-align: center;
    15. -ms-flex-align: center;
    16. align-items: center;
    17. background-image: linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB);
    18. border: 0;
    19. border-radius: 8px;
    20. -webkit-box-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;
    21. box-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;
    22. -webkit-box-sizing: border-box;
    23. box-sizing: border-box;
    24. color: #FFFFFF;
    25. display: -webkit-box;
    26. display: -ms-flexbox;
    27. display: flex;
    28. font-family: Phantomsans, sans-serif;
    29. font-size: 18px;
    30. -webkit-box-pack: center;
    31. -ms-flex-pack: center;
    32. justify-content: center;
    33. line-height: 1em;
    34. max-width: 100%;
    35. min-width: 140px;
    36. padding: 3px;
    37. text-decoration: none;
    38. -moz-user-select: none;
    39. -ms-user-select: none;
    40. user-select: none;
    41. -webkit-user-select: none;
    42. -ms-touch-action: manipulation;
    43. touch-action: manipulation;
    44. white-space: nowrap;
    45. cursor: pointer;
    46. -webkit-transition: all .3s;
    47. transition: all .3s;
    48. }
    49. button:active,
    50. button:hover {
    51. outline: 0;
    52. }
    53. button span {
    54. background-color: rgb(5, 6, 45);
    55. padding: 16px 24px;
    56. border-radius: 6px;
    57. width: 100%;
    58. height: 100%;
    59. -webkit-transition: 300ms;
    60. transition: 300ms;
    61. }
    62. button:hover span {
    63. background: none;
    64. }
    65. button:active {
    66. -webkit-transform: scale(0.9);
    67. -ms-transform: scale(0.9);
    68. transform: scale(0.9);
    69. }
    70. style>
    71. <body>
    72. <button>
    73. <span class="text">渐变Buttonspan>
    74. button>
    75. body>
    76. html>

    跑马灯 按钮

    1. 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. <title>跑马灯按钮title>
    8. head>
    9. <style>
    10. button {
    11. --border-radius: 15px;
    12. --border-width: 4px;
    13. -webkit-appearance: none;
    14. -moz-appearance: none;
    15. appearance: none;
    16. position: relative;
    17. padding: 1em 2em;
    18. border: 0;
    19. /* background-color: #212121; */
    20. font-family: "Roboto", Arial, "Segoe UI", sans-serif;
    21. font-size: 18px;
    22. font-weight: 500;
    23. color: #000;
    24. z-index: 2;
    25. }
    26. button::after {
    27. --m-i: linear-gradient(#000, #000);
    28. --m-o: content-box, padding-box;
    29. content: "";
    30. position: absolute;
    31. left: 0;
    32. top: 0;
    33. width: 100%;
    34. height: 100%;
    35. padding: var(--border-width);
    36. border-radius: var(--border-radius);
    37. background-image: conic-gradient(#488cfb,
    38. #29dbbc,
    39. #ddf505,
    40. #ff9f0e,
    41. #e440bb,
    42. #655adc,
    43. #488cfb);
    44. -webkit-mask-image: var(--m-i), var(--m-i);
    45. mask-image: var(--m-i), var(--m-i);
    46. -webkit-mask-origin: var(--m-o);
    47. mask-origin: var(--m-o);
    48. -webkit-mask-clip: var(--m-o);
    49. mask-composite: exclude;
    50. -webkit-mask-composite: destination-out;
    51. -webkit-filter: hue-rotate(0);
    52. filter: hue-rotate(0);
    53. -webkit-animation: rotate-hue linear 500ms infinite;
    54. animation: rotate-hue linear 500ms infinite;
    55. -webkit-animation-play-state: paused;
    56. animation-play-state: paused;
    57. }
    58. button:hover::after {
    59. -webkit-animation-play-state: running;
    60. animation-play-state: running;
    61. }
    62. @-webkit-keyframes rotate-hue {
    63. to {
    64. -webkit-filter: hue-rotate(1turn);
    65. filter: hue-rotate(1turn);
    66. }
    67. }
    68. @keyframes rotate-hue {
    69. to {
    70. -webkit-filter: hue-rotate(1turn);
    71. filter: hue-rotate(1turn);
    72. }
    73. }
    74. button,
    75. button::after {
    76. -webkit-box-sizing: border-box;
    77. box-sizing: border-box;
    78. }
    79. button:active {
    80. --border-width: 5px;
    81. }
    82. style>
    83. <body>
    84. <button>跑马灯button>
    85. body>
    86. html>

     下载按钮(带下载动画)

    1. 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. head>
    8. <style>
    9. .buttonDownload {
    10. display: inline-block;
    11. position: relative;
    12. padding: 10px 25px;
    13. background-color: #4CC713;
    14. color: white;
    15. font-family: sans-serif;
    16. text-decoration: none;
    17. font-size: 0.9em;
    18. text-align: center;
    19. text-indent: 15px;
    20. border: none;
    21. }
    22. .buttonDownload:hover {
    23. background-color: #45a21a;
    24. color: white;
    25. }
    26. .buttonDownload:before,
    27. .buttonDownload:after {
    28. content: ' ';
    29. display: block;
    30. position: absolute;
    31. left: 15px;
    32. top: 52%;
    33. }
    34. .buttonDownload:before {
    35. width: 10px;
    36. height: 2px;
    37. border-style: solid;
    38. border-width: 0 2px 2px;
    39. }
    40. .buttonDownload:after {
    41. width: 0;
    42. height: 0;
    43. margin-left: 3px;
    44. margin-top: -7px;
    45. border-style: solid;
    46. border-width: 4px 4px 0 4px;
    47. border-color: transparent;
    48. border-top-color: inherit;
    49. -webkit-animation: downloadArrow 1s linear infinite;
    50. animation: downloadArrow 1s linear infinite;
    51. -webkit-animation-play-state: paused;
    52. animation-play-state: paused;
    53. }
    54. .buttonDownload:hover:before {
    55. border-color: #cdefbd;
    56. }
    57. .buttonDownload:hover:after {
    58. border-top-color: #cdefbd;
    59. -webkit-animation-play-state: running;
    60. animation-play-state: running;
    61. }
    62. @-webkit-keyframes downloadArrow {
    63. 0% {
    64. margin-top: -7px;
    65. opacity: 1;
    66. }
    67. 0.001% {
    68. margin-top: -15px;
    69. opacity: 0.4;
    70. }
    71. 50% {
    72. opacity: 1;
    73. }
    74. 100% {
    75. margin-top: 0;
    76. opacity: 0.4;
    77. }
    78. }
    79. @keyframes downloadArrow {
    80. 0% {
    81. margin-top: -7px;
    82. opacity: 1;
    83. }
    84. 0.001% {
    85. margin-top: -15px;
    86. opacity: 0.4;
    87. }
    88. 50% {
    89. opacity: 1;
    90. }
    91. 100% {
    92. margin-top: 0;
    93. opacity: 0.4;
    94. }
    95. }
    96. style>
    97. <body>
    98. <button class="buttonDownload">下载button>
    99. body>
    100. html>

    下一步按钮(带动画)

    1. 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. head>
    8. <style>
    9. button {
    10. position: relative;
    11. font-size: 14px;
    12. letter-spacing: 3px;
    13. height: 3em;
    14. padding: 0 3em;
    15. border: none;
    16. background-color: #c41b54;
    17. color: #fff;
    18. text-transform: uppercase;
    19. overflow: hidden;
    20. border-radius: 5px
    21. }
    22. button::before {
    23. content: '';
    24. display: block;
    25. position: absolute;
    26. z-index: 0;
    27. bottom: 0;
    28. left: 0;
    29. height: 0px;
    30. width: 100%;
    31. background: rgb(196, 27, 84);
    32. background: -webkit-gradient(linear, left top, right top, color-stop(20%, rgba(196, 27, 84, 1)), to(rgba(124, 7, 46, 1)));
    33. background: linear-gradient(90deg, rgba(196, 27, 84, 1) 20%, rgba(124, 7, 46, 1) 100%);
    34. -webkit-transition: 0.2s;
    35. transition: 0.2s;
    36. }
    37. button .label {
    38. position: relative;
    39. }
    40. button .icon {
    41. display: -webkit-box;
    42. display: -ms-flexbox;
    43. display: flex;
    44. -webkit-box-align: center;
    45. -ms-flex-align: center;
    46. align-items: center;
    47. -webkit-box-pack: center;
    48. -ms-flex-pack: center;
    49. justify-content: center;
    50. height: 3em;
    51. width: 3em;
    52. position: absolute;
    53. top: 3em;
    54. right: 0;
    55. opacity: 0;
    56. -webkit-transition: 0.4s;
    57. transition: 0.4s;
    58. }
    59. button:hover::before {
    60. height: 100%;
    61. }
    62. button:hover .icon {
    63. top: 0;
    64. opacity: 1;
    65. }
    66. style>
    67. <body>
    68. <button>
    69. <span class="label">Nextspan>
    70. <span class="icon">
    71. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
    72. <path fill="none" d="M0 0h24v24H0z">path>
    73. <path fill="currentColor"
    74. d="M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z">path>
    75. svg>
    76. span>
    77. button>
    78. body>
    79. html>

     边框线滑动 按钮

    1. 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. head>
    8. <style>
    9. .main_div {
    10. --color: #3992e6;
    11. position: relative;
    12. z-index: 1;
    13. width: 162px;
    14. height: 44px;
    15. }
    16. .main_div::before {
    17. content: '';
    18. position: absolute;
    19. width: 30px;
    20. height: 30px;
    21. background: transparent;
    22. top: -7px;
    23. left: -7px;
    24. z-index: -5;
    25. border-top: 3px solid var(--color);
    26. border-left: 3px solid var(--color);
    27. -webkit-transition: 0.5s;
    28. transition: 0.5s;
    29. }
    30. .main_div::after {
    31. content: '';
    32. position: absolute;
    33. width: 30px;
    34. height: 30px;
    35. background: transparent;
    36. bottom: -7px;
    37. right: -7px;
    38. z-index: -5;
    39. border-right: 3px solid var(--color);
    40. border-bottom: 3px solid var(--color);
    41. -webkit-transition: 0.5s;
    42. transition: 0.5s;
    43. }
    44. .main_div:hover::before {
    45. width: 100%;
    46. height: 100%;
    47. }
    48. .main_div:hover::after {
    49. width: 100%;
    50. height: 100%;
    51. }
    52. .main_div button {
    53. padding: 0.7em 2em;
    54. font-size: 16px;
    55. background: #222222;
    56. color: #fff;
    57. border: none;
    58. cursor: pointer;
    59. font-family: inherit;
    60. }
    61. style>
    62. <body>
    63. <div class="main_div">
    64. <button>表框双线按钮button>
    65. div>
    66. body>
    67. html>

    下载按钮

    1. 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. head>
    8. <style>
    9. .cssbuttons-io-button {
    10. display: -webkit-box;
    11. display: -ms-flexbox;
    12. display: flex;
    13. -webkit-box-align: center;
    14. -ms-flex-align: center;
    15. align-items: center;
    16. font-family: inherit;
    17. font-weight: 500;
    18. font-size: 17px;
    19. padding: 0.8em 1.5em 0.8em 1.2em;
    20. color: white;
    21. background: #ad5389;
    22. background: -webkit-gradient(linear, left bottom, left top, from(rgba(77, 54, 208, 1)), to(rgba(132, 116, 254, 1)));
    23. background: linear-gradient(0deg, rgba(77, 54, 208, 1) 0%, rgba(132, 116, 254, 1) 100%);
    24. border: none;
    25. -webkit-box-shadow: 0 0.7em 1.5em -0.5em #4d36d0be;
    26. box-shadow: 0 0.7em 1.5em -0.5em #4d36d0be;
    27. letter-spacing: 0.05em;
    28. border-radius: 20em;
    29. }
    30. .cssbuttons-io-button svg {
    31. margin-right: 8px;
    32. }
    33. .cssbuttons-io-button:hover {
    34. -webkit-box-shadow: 0 0.5em 1.5em -0.5em #4d36d0be;
    35. box-shadow: 0 0.5em 1.5em -0.5em #4d36d0be;
    36. }
    37. .cssbuttons-io-button:active {
    38. -webkit-box-shadow: 0 0.3em 1em -0.5em #4d36d0be;
    39. box-shadow: 0 0.3em 1em -0.5em #4d36d0be;
    40. }
    41. style>
    42. <body>
    43. <button class="cssbuttons-io-button">
    44. <svg height="24" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
    45. <path d="M0 0h24v24H0z" fill="none">path>
    46. <path
    47. d="M1 14.5a6.496 6.496 0 0 1 3.064-5.519 8.001 8.001 0 0 1 15.872 0 6.5 6.5 0 0 1-2.936 12L7 21c-3.356-.274-6-3.078-6-6.5zm15.848 4.487a4.5 4.5 0 0 0 2.03-8.309l-.807-.503-.12-.942a6.001 6.001 0 0 0-11.903 0l-.12.942-.805.503a4.5 4.5 0 0 0 2.029 8.309l.173.013h9.35l.173-.013zM13 12h3l-4 5-4-5h3V8h2v4z"
    48. fill="currentColor">path>
    49. svg>
    50. <span>下载span>
    51. button>
    52. body>
    53. html>

    hover 对角聚中 按钮 

    1. 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. head>
    8. <style>
    9. .btn {
    10. --color: #00A97F;
    11. --color2: rgb(10, 25, 30);
    12. padding: 0.8em 1.75em;
    13. background-color: transparent;
    14. border-radius: 6px;
    15. border: .3px solid var(--color);
    16. -webkit-transition: .5s;
    17. transition: .5s;
    18. position: relative;
    19. overflow: hidden;
    20. cursor: pointer;
    21. z-index: 1;
    22. font-weight: 300;
    23. font-size: 17px;
    24. font-family: 'Roboto', 'Segoe UI', sans-serif;
    25. text-transform: uppercase;
    26. color: var(--color);
    27. }
    28. .btn::after, .btn::before {
    29. content: '';
    30. display: block;
    31. height: 100%;
    32. width: 100%;
    33. -webkit-transform: skew(90deg) translate(-50%, -50%);
    34. -ms-transform: skew(90deg) translate(-50%, -50%);
    35. transform: skew(90deg) translate(-50%, -50%);
    36. position: absolute;
    37. inset: 50%;
    38. left: 25%;
    39. z-index: -1;
    40. -webkit-transition: .5s ease-out;
    41. transition: .5s ease-out;
    42. background-color: var(--color);
    43. }
    44. .btn::before {
    45. top: -50%;
    46. left: -25%;
    47. -webkit-transform: skew(90deg) rotate(180deg) translate(-50%, -50%);
    48. -ms-transform: skew(90deg) rotate(180deg) translate(-50%, -50%);
    49. transform: skew(90deg) rotate(180deg) translate(-50%, -50%);
    50. }
    51. .btn:hover::before {
    52. -webkit-transform: skew(45deg) rotate(180deg) translate(-50%, -50%);
    53. -ms-transform: skew(45deg) rotate(180deg) translate(-50%, -50%);
    54. transform: skew(45deg) rotate(180deg) translate(-50%, -50%);
    55. }
    56. .btn:hover::after {
    57. -webkit-transform: skew(45deg) translate(-50%, -50%);
    58. -ms-transform: skew(45deg) translate(-50%, -50%);
    59. transform: skew(45deg) translate(-50%, -50%);
    60. }
    61. .btn:hover {
    62. color: var(--color2);
    63. }
    64. .btn:active {
    65. -webkit-filter: brightness(.7);
    66. filter: brightness(.7);
    67. -webkit-transform: scale(.98);
    68. -ms-transform: scale(.98);
    69. transform: scale(.98);
    70. }
    71. style>
    72. <body>
    73. <button class="btn"> Button button>
    74. body>
    75. html>

     hover 折角按钮

    1. 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. head>
    8. <style>
    9. body{
    10. background-color: #000;
    11. }
    12. button {
    13. position: relative;
    14. font-size: 1.2em;
    15. padding: 0.7em 1.4em;
    16. background-color: #BF0426;
    17. text-decoration: none;
    18. border: none;
    19. border-radius: 0.5em;
    20. color: #DEDEDE;
    21. box-shadow: 0.5em 0.5em 0.5em rgba(0, 0, 0, 0.3);
    22. }
    23. button::before {
    24. position: absolute;
    25. content: '';
    26. height: 0;
    27. width: 0;
    28. top: 0;
    29. left: 0;
    30. background: linear-gradient(135deg, rgba(33,33,33,1) 0%, rgba(33,33,33,1) 50%, rgba(150,4,31,1) 50%, rgba(191,4,38,1) 60%);
    31. border-radius: 0 0 0.5em 0;
    32. box-shadow: 0.2em 0.2em 0.2em rgba(0, 0, 0, 0.3);
    33. transition: 0.3s;
    34. }
    35. button:hover::before {
    36. width: 2em;
    37. height: 2em;
    38. }
    39. button:active {
    40. box-shadow: 0.2em 0.2em 0.3em rgba(0, 0, 0, 0.3);
    41. transform: translate(0.1em, 0.1em);
    42. }
    43. style>
    44. <body>
    45. <button>
    46. <b>hover 折角按钮b>
    47. button>
    48. body>
    49. html>

     动画提示 按钮

    1. 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. head>
    8. <style>
    9. .uiverse {
    10. position: relative;
    11. top: 200px;
    12. background: #ffffff;
    13. color: #000;
    14. /* padding: 15px; */
    15. /* margin: 10px; */
    16. border-radius: 10px;
    17. width: 150px;
    18. height: 50px;
    19. font-size: 17px;
    20. display: -webkit-box;
    21. display: -ms-flexbox;
    22. display: flex;
    23. -webkit-box-pack: center;
    24. -ms-flex-pack: center;
    25. justify-content: center;
    26. -webkit-box-align: center;
    27. -ms-flex-align: center;
    28. align-items: center;
    29. -webkit-box-orient: vertical;
    30. -webkit-box-direction: normal;
    31. -ms-flex-direction: column;
    32. flex-direction: column;
    33. -webkit-box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    34. box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    35. cursor: pointer;
    36. -webkit-transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    37. transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    38. }
    39. .tooltip {
    40. position: absolute;
    41. top: 0;
    42. font-size: 14px;
    43. background: #ffffff;
    44. color: #ffffff;
    45. padding: 5px 8px;
    46. border-radius: 5px;
    47. -webkit-box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    48. box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    49. opacity: 0;
    50. pointer-events: none;
    51. -webkit-transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    52. transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    53. }
    54. .tooltip::before {
    55. position: absolute;
    56. content: "";
    57. height: 8px;
    58. width: 8px;
    59. background: #ffffff;
    60. bottom: -3px;
    61. left: 50%;
    62. -webkit-transform: translate(-50%) rotate(45deg);
    63. -ms-transform: translate(-50%) rotate(45deg);
    64. transform: translate(-50%) rotate(45deg);
    65. -webkit-transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    66. transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    67. }
    68. .uiverse:hover .tooltip {
    69. top: -45px;
    70. opacity: 1;
    71. visibility: visible;
    72. pointer-events: auto;
    73. }
    74. svg:hover span,
    75. svg:hover .tooltip {
    76. text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1);
    77. }
    78. .uiverse:hover,
    79. .uiverse:hover .tooltip,
    80. .uiverse:hover .tooltip::before {
    81. background: linear-gradient(320deg, rgb(3, 77, 146), rgb(0, 60, 255));
    82. color: #ffffff;
    83. }
    84. style>
    85. <body>
    86. <div class="uiverse">
    87. <span class="tooltip">uiverse.iospan>
    88. <span>
    89. Tooltip
    90. span>
    91. div>
    92. body>
    93. html>

    流光按钮:

    1. html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8" />
    5. <title>渐变按钮title>
    6. <style>
    7. .BlueButton {
    8. color: #fff;
    9. width: 8rem;
    10. margin: 0.8rem auto;
    11. border-radius: 0.3rem;
    12. padding: 0.5rem;
    13. text-align: center;
    14. display: block;
    15. text-decoration: none;
    16. background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
    17. background-size: 400%;
    18. }
    19. .BlueButton:hover {
    20. animation: animate 8s linear infinite;
    21. }
    22. @keyframes animate {
    23. 0% {
    24. background-position: 0%;
    25. }
    26. 100% {
    27. background-position: 400%;
    28. }
    29. }
    30. .BlueButton::before {
    31. background: linear-gradient( #03a9f4, #f441a5, #ffeb3b, #03a9f4);
    32. background-size: 400%;
    33. border-radius: 0.3rem;
    34. opacity: 0;
    35. transition: 0.5s;
    36. }
    37. style>
    38. head>
    39. <body>
    40. <a
    41. class="BlueButton"
    42. href="#"
    43. target="_blank"
    44. >博客源码
    45. body>
    46. html>

    跑马灯 

    1. <style scoped lang="scss">
    2. .voltage-button {
    3. position: relative;
    4. height: 3rem;
    5. width: 14rem;
    6. // background-color: red;
    7. z-index: 120;
    8. top: -180px;
    9. left: 15%;
    10. }
    11. .voltage-button button {
    12. color: white;
    13. background: #0d1127;
    14. border-radius: 6rem;
    15. height: 3rem;
    16. width: 14rem;
    17. border: 1px solid #5978f3;
    18. font-size: 1.2rem;
    19. line-height: 1em;
    20. letter-spacing: 0.075em;
    21. transition: background 0.3s;
    22. }
    23. .voltage-button button:hover {
    24. cursor: pointer;
    25. background: #0f1c53;
    26. }
    27. .voltage-button button:hover + svg,
    28. .voltage-button button:hover + svg + .dots {
    29. opacity: 1;
    30. }
    31. .voltage-button svg {
    32. display: block;
    33. position: absolute;
    34. top: -0.75em;
    35. left: -0.25em;
    36. height: 4.5rem;
    37. width: 15rem;
    38. pointer-events: none;
    39. opacity: 0;
    40. transition: opacity 0.4s;
    41. transition-delay: 0.1s;
    42. }
    43. .voltage-button svg path {
    44. stroke-dasharray: 100;
    45. filter: url("#glow");
    46. }
    47. .voltage-button svg path.line-1 {
    48. stroke: #f6de8d;
    49. stroke-dashoffset: 0;
    50. animation: spark-1 3s linear infinite;
    51. }
    52. .voltage-button svg path.line-2 {
    53. stroke: #6bfeff;
    54. stroke-dashoffset: 500;
    55. animation: spark-2 3s linear infinite;
    56. }
    57. .voltage-button .dots {
    58. opacity: 0;
    59. transition: opacity 0.3s;
    60. transition-delay: 0.4s;
    61. }
    62. .voltage-button .dots .dot {
    63. width: 1rem;
    64. height: 1rem;
    65. background: white;
    66. border-radius: 100%;
    67. position: absolute;
    68. opacity: 0;
    69. }
    70. .voltage-button .dots .dot-1 {
    71. top: 0;
    72. left: 20%;
    73. animation: fly-up 3s linear infinite;
    74. }
    75. .voltage-button .dots .dot-2 {
    76. top: 0;
    77. left: 55%;
    78. animation: fly-up 3s linear infinite;
    79. animation-delay: 0.5s;
    80. }
    81. .voltage-button .dots .dot-3 {
    82. top: 0;
    83. left: 80%;
    84. animation: fly-up 3s linear infinite;
    85. animation-delay: 1s;
    86. }
    87. .voltage-button .dots .dot-4 {
    88. bottom: 0;
    89. left: 30%;
    90. animation: fly-down 3s linear infinite;
    91. animation-delay: 2.5s;
    92. }
    93. .voltage-button .dots .dot-5 {
    94. bottom: 0;
    95. left: 65%;
    96. animation: fly-down 3s linear infinite;
    97. animation-delay: 1.5s;
    98. }
    99. @keyframes spark-1 {
    100. to {
    101. stroke-dashoffset: -1000;
    102. }
    103. }
    104. @keyframes spark-2 {
    105. to {
    106. stroke-dashoffset: -500;
    107. }
    108. }
    109. @keyframes fly-up {
    110. 0% {
    111. opacity: 0;
    112. transform: translateY(0) scale(0.2);
    113. }
    114. 5% {
    115. opacity: 1;
    116. transform: translateY(-1.5rem) scale(0.4);
    117. }
    118. 10%,
    119. 100% {
    120. opacity: 0;
    121. transform: translateY(-3rem) scale(0.2);
    122. }
    123. }
    124. @keyframes fly-down {
    125. 0% {
    126. opacity: 0;
    127. transform: translateY(0) scale(0.2);
    128. }
    129. 5% {
    130. opacity: 1;
    131. transform: translateY(1.5rem) scale(0.4);
    132. }
    133. 10%,
    134. 100% {
    135. opacity: 0;
    136. transform: translateY(3rem) scale(0.2);
    137. }
    138. }
    139. style>

    loading相关

    loading网站,一键复制https://epic-spinners.epicmax.co/?mode=light

    经典loading

    1. 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. <title>经典loadingtitle>
    8. head>
    9. <style>
    10. svg {
    11. width: 3.25em;
    12. -webkit-transform-origin: center;
    13. -ms-transform-origin: center;
    14. transform-origin: center;
    15. -webkit-animation: rotate4 2s linear infinite;
    16. animation: rotate4 2s linear infinite;
    17. }
    18. circle {
    19. fill: none;
    20. stroke: hsl(214, 97%, 59%);
    21. stroke-width: 2;
    22. stroke-dasharray: 1, 200;
    23. stroke-dashoffset: 0;
    24. stroke-linecap: round;
    25. -webkit-animation: dash4 1.5s ease-in-out infinite;
    26. animation: dash4 1.5s ease-in-out infinite;
    27. }
    28. @-webkit-keyframes rotate4 {
    29. 100% {
    30. -webkit-transform: rotate(360deg);
    31. transform: rotate(360deg);
    32. }
    33. }
    34. @keyframes rotate4 {
    35. 100% {
    36. -webkit-transform: rotate(360deg);
    37. transform: rotate(360deg);
    38. }
    39. }
    40. @-webkit-keyframes dash4 {
    41. 0% {
    42. stroke-dasharray: 1, 200;
    43. stroke-dashoffset: 0;
    44. }
    45. 50% {
    46. stroke-dasharray: 90, 200;
    47. stroke-dashoffset: -35px;
    48. }
    49. 100% {
    50. stroke-dashoffset: -125px;
    51. }
    52. }
    53. @keyframes dash4 {
    54. 0% {
    55. stroke-dasharray: 1, 200;
    56. stroke-dashoffset: 0;
    57. }
    58. 50% {
    59. stroke-dasharray: 90, 200;
    60. stroke-dashoffset: -35px;
    61. }
    62. 100% {
    63. stroke-dashoffset: -125px;
    64. }
    65. }
    66. style>
    67. <body>
    68. <svg viewBox="25 25 50 50">
    69. <circle r="20" cy="50" cx="50">circle>
    70. svg>
    71. body>
    72. html>

    荧光文字loading

    1. 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. head>
    8. <style>
    9. .scanner span {
    10. color: transparent;
    11. font-size: 1.4rem;
    12. position: relative;
    13. overflow: hidden;
    14. }
    15. .scanner span::before {
    16. content: "Loading...";
    17. position: absolute;
    18. top: 0;
    19. left: 0;
    20. width: 0;
    21. height: 100%;
    22. border-right: 4px solid #17FEFF;
    23. overflow: hidden;
    24. color: #17FEFF;
    25. -webkit-animation: load91371 2s linear infinite;
    26. animation: load91371 2s linear infinite;
    27. }
    28. @-webkit-keyframes load91371 {
    29. 0%,
    30. 10%,
    31. 100% {
    32. width: 0;
    33. }
    34. 10%,
    35. 20%,
    36. 30%,
    37. 40%,
    38. 50%,
    39. 60%,
    40. 70%,
    41. 80%,
    42. 90%,
    43. 100% {
    44. border-right-color: transparent;
    45. }
    46. 11%,
    47. 21%,
    48. 31%,
    49. 41%,
    50. 51%,
    51. 61%,
    52. 71%,
    53. 81%,
    54. 91% {
    55. border-right-color: #17FEFF;
    56. }
    57. 60%,
    58. 80% {
    59. width: 100%;
    60. }
    61. }
    62. @keyframes load91371 {
    63. 0%,
    64. 10%,
    65. 100% {
    66. width: 0;
    67. }
    68. 10%,
    69. 20%,
    70. 30%,
    71. 40%,
    72. 50%,
    73. 60%,
    74. 70%,
    75. 80%,
    76. 90%,
    77. 100% {
    78. border-right-color: transparent;
    79. }
    80. 11%,
    81. 21%,
    82. 31%,
    83. 41%,
    84. 51%,
    85. 61%,
    86. 71%,
    87. 81%,
    88. 91% {
    89. border-right-color: #17FEFF;
    90. }
    91. 60%,
    92. 80% {
    93. width: 100%;
    94. }
    95. }
    96. style>
    97. <body>
    98. <div class="loader">
    99. <div class="scanner">
    100. <span>Loading...span>
    101. div>
    102. div>
    103. body>
    104. html>

    方块弹性旋转loading

    1. 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. head>
    8. <style>
    9. .loader {
    10. width: 48px;
    11. height: 48px;
    12. margin: auto;
    13. position: relative;
    14. }
    15. .loader:before {
    16. content: '';
    17. width: 48px;
    18. height: 5px;
    19. background: #f0808050;
    20. position: absolute;
    21. top: 60px;
    22. left: 0;
    23. border-radius: 50%;
    24. -webkit-animation: shadow324 0.5s linear infinite;
    25. animation: shadow324 0.5s linear infinite;
    26. }
    27. .loader:after {
    28. content: '';
    29. width: 100%;
    30. height: 100%;
    31. background: #f08080;
    32. position: absolute;
    33. top: 0;
    34. left: 0;
    35. border-radius: 4px;
    36. -webkit-animation: jump7456 0.5s linear infinite;
    37. animation: jump7456 0.5s linear infinite;
    38. }
    39. @-webkit-keyframes jump7456 {
    40. 15% {
    41. border-bottom-right-radius: 3px;
    42. }
    43. 25% {
    44. -webkit-transform: translateY(9px) rotate(22.5deg);
    45. transform: translateY(9px) rotate(22.5deg);
    46. }
    47. 50% {
    48. -webkit-transform: translateY(18px) scale(1, .9) rotate(45deg);
    49. transform: translateY(18px) scale(1, .9) rotate(45deg);
    50. border-bottom-right-radius: 40px;
    51. }
    52. 75% {
    53. -webkit-transform: translateY(9px) rotate(67.5deg);
    54. transform: translateY(9px) rotate(67.5deg);
    55. }
    56. 100% {
    57. -webkit-transform: translateY(0) rotate(90deg);
    58. transform: translateY(0) rotate(90deg);
    59. }
    60. }
    61. @keyframes jump7456 {
    62. 15% {
    63. border-bottom-right-radius: 3px;
    64. }
    65. 25% {
    66. -webkit-transform: translateY(9px) rotate(22.5deg);
    67. transform: translateY(9px) rotate(22.5deg);
    68. }
    69. 50% {
    70. -webkit-transform: translateY(18px) scale(1, .9) rotate(45deg);
    71. transform: translateY(18px) scale(1, .9) rotate(45deg);
    72. border-bottom-right-radius: 40px;
    73. }
    74. 75% {
    75. -webkit-transform: translateY(9px) rotate(67.5deg);
    76. transform: translateY(9px) rotate(67.5deg);
    77. }
    78. 100% {
    79. -webkit-transform: translateY(0) rotate(90deg);
    80. transform: translateY(0) rotate(90deg);
    81. }
    82. }
    83. @-webkit-keyframes shadow324 {
    84. 0%,
    85. 100% {
    86. -webkit-transform: scale(1, 1);
    87. transform: scale(1, 1);
    88. }
    89. 50% {
    90. -webkit-transform: scale(1.2, 1);
    91. transform: scale(1.2, 1);
    92. }
    93. }
    94. @keyframes shadow324 {
    95. 0%,
    96. 100% {
    97. -webkit-transform: scale(1, 1);
    98. transform: scale(1, 1);
    99. }
    100. 50% {
    101. -webkit-transform: scale(1.2, 1);
    102. transform: scale(1.2, 1);
    103. }
    104. }
    105. style>
    106. <body>
    107. <div class="loader">div>
    108. body>
    109. html>

    阶梯 loading

    1. 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. head>
    8. <style>
    9. body {
    10. background: rgba(0, 0, 0, .25);
    11. }
    12. .loader {
    13. position: relative;
    14. width: 120px;
    15. height: 90px;
    16. margin: 200px auto;
    17. }
    18. .loader:before {
    19. content: "";
    20. position: absolute;
    21. bottom: 30px;
    22. left: 50px;
    23. height: 30px;
    24. width: 30px;
    25. border-radius: 50%;
    26. background: #2a9d8f;
    27. -webkit-animation: loading-bounce 0.5s ease-in-out infinite alternate;
    28. animation: loading-bounce 0.5s ease-in-out infinite alternate;
    29. }
    30. .loader:after {
    31. content: "";
    32. position: absolute;
    33. right: 0;
    34. top: 0;
    35. height: 7px;
    36. width: 45px;
    37. border-radius: 4px;
    38. -webkit-box-shadow: 0 5px 0 #f2f2f2, -35px 50px 0 #f2f2f2, -70px 95px 0 #f2f2f2;
    39. box-shadow: 0 5px 0 #f2f2f2, -35px 50px 0 #f2f2f2, -70px 95px 0 #f2f2f2;
    40. -webkit-animation: loading-step 1s ease-in-out infinite;
    41. animation: loading-step 1s ease-in-out infinite;
    42. }
    43. @-webkit-keyframes loading-bounce {
    44. 0% {
    45. -webkit-transform: scale(1, 0.7);
    46. transform: scale(1, 0.7);
    47. }
    48. 40% {
    49. -webkit-transform: scale(0.8, 1.2);
    50. transform: scale(0.8, 1.2);
    51. }
    52. 60% {
    53. -webkit-transform: scale(1, 1);
    54. transform: scale(1, 1);
    55. }
    56. 100% {
    57. bottom: 140px;
    58. }
    59. }
    60. @keyframes loading-bounce {
    61. 0% {
    62. -webkit-transform: scale(1, 0.7);
    63. transform: scale(1, 0.7);
    64. }
    65. 40% {
    66. -webkit-transform: scale(0.8, 1.2);
    67. transform: scale(0.8, 1.2);
    68. }
    69. 60% {
    70. -webkit-transform: scale(1, 1);
    71. transform: scale(1, 1);
    72. }
    73. 100% {
    74. bottom: 140px;
    75. }
    76. }
    77. @-webkit-keyframes loading-step {
    78. 0% {
    79. -webkit-box-shadow: 0 10px 0 rgba(0, 0, 0, 0),
    80. 0 10px 0 #f2f2f2,
    81. -35px 50px 0 #f2f2f2,
    82. -70px 90px 0 #f2f2f2;
    83. box-shadow: 0 10px 0 rgba(0, 0, 0, 0),
    84. 0 10px 0 #f2f2f2,
    85. -35px 50px 0 #f2f2f2,
    86. -70px 90px 0 #f2f2f2;
    87. }
    88. 100% {
    89. -webkit-box-shadow: 0 10px 0 #f2f2f2,
    90. -35px 50px 0 #f2f2f2,
    91. -70px 90px 0 #f2f2f2,
    92. -70px 90px 0 rgba(0, 0, 0, 0);
    93. box-shadow: 0 10px 0 #f2f2f2,
    94. -35px 50px 0 #f2f2f2,
    95. -70px 90px 0 #f2f2f2,
    96. -70px 90px 0 rgba(0, 0, 0, 0);
    97. }
    98. }
    99. @keyframes loading-step {
    100. 0% {
    101. -webkit-box-shadow: 0 10px 0 rgba(0, 0, 0, 0),
    102. 0 10px 0 #f2f2f2,
    103. -35px 50px 0 #f2f2f2,
    104. -70px 90px 0 #f2f2f2;
    105. box-shadow: 0 10px 0 rgba(0, 0, 0, 0),
    106. 0 10px 0 #f2f2f2,
    107. -35px 50px 0 #f2f2f2,
    108. -70px 90px 0 #f2f2f2;
    109. }
    110. 100% {
    111. -webkit-box-shadow: 0 10px 0 #f2f2f2,
    112. -35px 50px 0 #f2f2f2,
    113. -70px 90px 0 #f2f2f2,
    114. -70px 90px 0 rgba(0, 0, 0, 0);
    115. box-shadow: 0 10px 0 #f2f2f2,
    116. -35px 50px 0 #f2f2f2,
    117. -70px 90px 0 #f2f2f2,
    118. -70px 90px 0 rgba(0, 0, 0, 0);
    119. }
    120. }
    121. style>
    122. <body>
    123. <div class="loader">div>
    124. body>
    125. html>

    手机端 loading

    1. 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. <title>Documenttitle>
    8. head>
    9. <style>
    10. .spinner .path {
    11. -webkit-animation: infinity-load 1.5s infinite cubic-bezier(.65, .05, .36, 1);
    12. animation: infinity-load 1.5s infinite cubic-bezier(.65, .05, .36, 1)
    13. }
    14. @-webkit-keyframes infinity-load {
    15. to {
    16. stroke-dashoffset: 10
    17. }
    18. }
    19. @keyframes infinity-load {
    20. to {
    21. stroke-dashoffset: 10
    22. }
    23. }
    24. style>
    25. <body>
    26. <div class="spinner">
    27. <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill="none">
    28. <path stroke="#E91E63" stroke-width="1.5"
    29. d="M9.743 10.25c3.213 1.96 5.017 4.676 7.248 4.676 2.588 0 2.791-4.8.518-5.668-3.107-1.187-5.178 3.719-8.284 5.03-1.415.677-3.41 1.014-4.09-1.14-.251-.797-.13-1.65.133-2.442v0c.425-1.278 2.132-1.66 3.35-1.081.304.144.668.346 1.125.625z"
    30. stroke-dashoffset="100" stroke-dasharray="100" class="path">
    31. path>
    32. svg>
    33. div>
    34. body>
    35. html>

    经典loading

    1. 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. <title>Documenttitle>
    8. head>
    9. <style>
    10. .loader {
    11. width: 60px;
    12. height: 60px;
    13. }
    14. .loader::before {
    15. content: "";
    16. -webkit-box-sizing: border-box;
    17. box-sizing: border-box;
    18. position: absolute;
    19. width: 60px;
    20. height: 60px;
    21. border-radius: 50%;
    22. border-top: 2px solid #8900FF;
    23. border-right: 2px solid transparent;
    24. -webkit-animation: spinner8217 0.8s linear infinite;
    25. animation: spinner8217 0.8s linear infinite;
    26. }
    27. @-webkit-keyframes spinner8217 {
    28. to {
    29. -webkit-transform: rotate(360deg);
    30. transform: rotate(360deg);
    31. }
    32. }
    33. @keyframes spinner8217 {
    34. to {
    35. -webkit-transform: rotate(360deg);
    36. transform: rotate(360deg);
    37. }
    38. }
    39. style>
    40. <body>
    41. <div class="loader">div>
    42. body>
    43. html>

    杠杆loading

    1. 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. <title>Documenttitle>
    8. head>
    9. <style>
    10. * {
    11. margin: 0;
    12. padding: 0;
    13. }
    14. .wrap,
    15. body {
    16. width: 100%;
    17. height: 100%;
    18. background-color: #000;
    19. }
    20. .ball {
    21. position: relative;
    22. bottom: 50px;
    23. left: calc(100% - 20px);
    24. width: 50px;
    25. height: 50px;
    26. background: #fff;
    27. border-radius: 50%;
    28. -webkit-animation: ball-move8234 3s ease-in-out 1s infinite alternate;
    29. animation: ball-move8234 3s ease-in-out 1s infinite alternate;
    30. }
    31. .ball::after {
    32. position: absolute;
    33. content: '';
    34. top: 25px;
    35. right: 5px;
    36. width: 5px;
    37. height: 5px;
    38. background: #000;
    39. border-radius: 50%;
    40. }
    41. .bar {
    42. position: fixed;
    43. top: 50%;
    44. left: 40%;
    45. transform: translate(-50%, -50%);
    46. width: 200px;
    47. height: 12.5px;
    48. background: #FFDAAF;
    49. border-radius: 30px;
    50. -webkit-transform: rotate(-15deg);
    51. -ms-transform: rotate(-15deg);
    52. transform: rotate(-15deg);
    53. -webkit-animation: up-down6123 3s ease-in-out 1s infinite alternate;
    54. animation: up-down6123 3s ease-in-out 1s infinite alternate;
    55. }
    56. @-webkit-keyframes up-down6123 {
    57. from {
    58. -webkit-transform: rotate(-15deg);
    59. transform: rotate(-15deg);
    60. }
    61. to {
    62. -webkit-transform: rotate(15deg);
    63. transform: rotate(15deg);
    64. }
    65. }
    66. @keyframes up-down6123 {
    67. from {
    68. -webkit-transform: rotate(-15deg);
    69. transform: rotate(-15deg);
    70. }
    71. to {
    72. -webkit-transform: rotate(15deg);
    73. transform: rotate(15deg);
    74. }
    75. }
    76. @-webkit-keyframes ball-move8234 {
    77. from {
    78. left: calc(100% - 40px);
    79. -webkit-transform: rotate(360deg);
    80. transform: rotate(360deg);
    81. }
    82. to {
    83. left: calc(0% - 20px);
    84. -webkit-transform: rotate(0deg);
    85. transform: rotate(0deg);
    86. }
    87. }
    88. @keyframes ball-move8234 {
    89. from {
    90. left: calc(100% - 40px);
    91. -webkit-transform: rotate(360deg);
    92. transform: rotate(360deg);
    93. }
    94. to {
    95. left: calc(0% - 20px);
    96. -webkit-transform: rotate(0deg);
    97. transform: rotate(0deg);
    98. }
    99. }
    100. style>
    101. <body>
    102. <div class="wrap">
    103. <div class="bar">
    104. <div class="ball">div>
    105. div>
    106. div>
    107. body>
    108. html>

    齿轮loading

    1. 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. <title>Documenttitle>
    8. head>
    9. <style>
    10. .spinner {
    11. width: 56px;
    12. height: 56px;
    13. display: grid;
    14. color: #004dff;
    15. background: radial-gradient(farthest-side, currentColor calc(100% - 7px), #0000 calc(100% - 6px) 0);
    16. -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 15px), #000 calc(100% - 13px));
    17. border-radius: 50%;
    18. animation: spinner-sm4bhi 2s infinite linear;
    19. }
    20. .spinner::before,
    21. .spinner::after {
    22. content: "";
    23. grid-area: 1/1;
    24. background: linear-gradient(currentColor 0 0) center,
    25. linear-gradient(currentColor 0 0) center;
    26. background-size: 100% 11px, 11px 100%;
    27. background-repeat: no-repeat;
    28. }
    29. .spinner::after {
    30. transform: rotate(45deg);
    31. }
    32. @keyframes spinner-sm4bhi {
    33. 100% {
    34. transform: rotate(1turn);
    35. }
    36. }
    37. style>
    38. <body>
    39. <div class="spinner">div>
    40. body>
    41. html>

    流线边框

    1. 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. <title>Documenttitle>
    8. head>
    9. <style>
    10. /* From cssbuttons.io by @satyamchaudharydev */
    11. .loader {
    12. --loader: rgb(226, 13, 13);
    13. --loader-size: 3px;
    14. position: relative;
    15. width: 400px;
    16. height: 200px;
    17. overflow: hidden;
    18. transition: .5s;
    19. letter-spacing: 2px;
    20. border: 1px solid #000;
    21. }
    22. .loader span {
    23. position: absolute;
    24. }
    25. .loader span:nth-child(1) {
    26. top: 0;
    27. left: -100%;
    28. width: 100%;
    29. height: var(--loader-size);
    30. background: linear-gradient(90deg, transparent, var(--loader));
    31. animation: loader-anim1 5s linear infinite;
    32. }
    33. @keyframes loader-anim1 {
    34. 0% {
    35. left: -100%;
    36. }
    37. 50%,
    38. 100% {
    39. left: 100%;
    40. }
    41. }
    42. .loader span:nth-child(2) {
    43. top: -100%;
    44. right: 0;
    45. width: var(--loader-size);
    46. height: 100%;
    47. background: linear-gradient(180deg, transparent, var(--loader));
    48. animation: loader-anim2 5s linear infinite;
    49. animation-delay: .25s
    50. }
    51. @keyframes loader-anim2 {
    52. 0% {
    53. top: -100%;
    54. }
    55. 50%,
    56. 100% {
    57. top: 100%;
    58. }
    59. }
    60. .loader span:nth-child(3) {
    61. bottom: 0;
    62. right: -100%;
    63. width: 100%;
    64. height: var(--loader-size);
    65. background: linear-gradient(270deg, transparent, var(--loader));
    66. animation: loader-anim3 5s linear infinite;
    67. animation-delay: .5s
    68. }
    69. @keyframes loader-anim3 {
    70. 0% {
    71. right: -100%;
    72. }
    73. 50%,
    74. 100% {
    75. right: 100%;
    76. }
    77. }
    78. .loader span:nth-child(4) {
    79. bottom: -100%;
    80. left: 0;
    81. width: var(--loader-size);
    82. height: 100%;
    83. background: linear-gradient(360deg, transparent, var(--loader));
    84. animation: loader-anim4 5s linear infinite;
    85. animation-delay: .75s
    86. }
    87. @keyframes loader-anim4 {
    88. 0% {
    89. bottom: -100%;
    90. }
    91. 50%,
    92. 100% {
    93. bottom: 100%;
    94. }
    95. }
    96. style>
    97. <body>
    98. <div class="loader">
    99. <span>span>
    100. <span>span>
    101. <span>span>
    102. <span>span>
    103. div>
    104. body>
    105. html>

    计算机 

    1. html>
    2. <html>
    3. <head>
    4. <title>Calculator | Javascript Mini Projecttitle>
    5. <link rel="stylesheet" type="text/css" href="style.css">
    6. head>
    7. <body>
    8. <div class="toggleBtn">div>
    9. <div class="calculator">
    10. <div class="buttons">
    11. <h2 id="value">h2>
    12. <span id="clear">Clearspan>
    13. <span>/span>
    14. <span>*span>
    15. <span>7span>
    16. <span>8span>
    17. <span>9span>
    18. <span>-span>
    19. <span>4span>
    20. <span>5span>
    21. <span>6span>
    22. <span id="plus">+span>
    23. <span>1span>
    24. <span>2span>
    25. <span>3span>
    26. <span>0span>
    27. <span>00span>
    28. <span>.span>
    29. <span id="equal">=span>
    30. div>
    31. div>
    32. <script>
    33. let buttons = document.querySelector(".buttons");
    34. let btn = buttons.querySelectorAll("span");
    35. let value = document.getElementById("value");
    36. let toggleBtn = document.querySelector('.toggleBtn')
    37. let body = document.querySelector('body')
    38. for(let i=0; ilength; i++){
    39. btn[i].addEventListener("click", function () {
    40. if(this.innerHTML=="="){
    41. value.innerHTML = eval(value.innerHTML);
    42. }else{
    43. if(this.innerHTML=='Clear'){
    44. value.innerHTML = "";
    45. }
    46. else{
    47. value.innerHTML += this.innerHTML;
    48. }
    49. }
    50. });
    51. }
    52. toggleBtn.onclick = function(){
    53. body.classList.toggle('dark')
    54. }
    55. script>
    56. body>
    57. html>

    1. *
    2. {
    3. margin: 0;
    4. padding: 0;
    5. box-sizing: border-box;
    6. font-family: consolas;
    7. }
    8. body
    9. {
    10. display: flex;
    11. justify-content: center;
    12. align-items: center;
    13. min-height: 100vh;
    14. background: #edf1f4;
    15. }
    16. .calculator
    17. {
    18. position: relative;
    19. width: 340px;
    20. padding: 20px;
    21. border-radius: 20px;
    22. box-shadow: 15px 15px 20px rgba(0,0,0,0.1),
    23. -15px -15px 20px #fffb;
    24. }
    25. .calculator .buttons
    26. {
    27. position: relative;
    28. display: grid;
    29. }
    30. .calculator .buttons #value
    31. {
    32. position: relative;
    33. left: 8px;
    34. grid-column: span 4;
    35. height: 100px;
    36. line-height: 100px;
    37. padding: 0 20px;
    38. border-radius: 10px;
    39. text-align: end;
    40. font-size: 2em;
    41. margin-bottom: 12px;
    42. color: #5166d6;
    43. overflow: hidden;
    44. font-weight: 500;
    45. width: calc(100% - 16px);
    46. user-select: none;
    47. box-shadow: inset 5px 5px 10px rgba(0,0,0,0.1),
    48. inset -5px -5px 20px #fff;
    49. }
    50. .calculator .buttons span
    51. {
    52. position: relative;
    53. display: flex;
    54. justify-content: center;
    55. align-items: center;
    56. padding: 10px;
    57. border-radius: 10px;
    58. margin: 10px;
    59. min-width: 40px;
    60. font-size: 1.2em;
    61. color: #666;
    62. font-weight: 700;
    63. border: 2px solid #edf1f4;
    64. box-shadow: 5px 5px 10px rgba(0,0,0,0.1),
    65. -5px -5px 10px #fff;
    66. cursor: pointer;
    67. user-select: none;
    68. }
    69. .calculator .buttons span:active
    70. {
    71. color: #f44336;
    72. box-shadow: inset 5px 5px 10px rgba(0,0,0,0.1),
    73. inset -5px -5px 10px #fff;
    74. }
    75. .calculator .buttons span#clear
    76. {
    77. grid-column: span 2;
    78. background: #f44336;
    79. border: 2px solid #edf1f4;
    80. color: #fff;
    81. }
    82. .calculator .buttons span#plus
    83. {
    84. grid-row: span 2;
    85. background: #31a935;
    86. border: 2px solid #edf1f4;
    87. color: #fff;
    88. }
    89. .calculator .buttons span#equal
    90. {
    91. grid-row: span 2;
    92. background: #2196f3;
    93. border: 2px solid #edf1f4;
    94. color: #fff;
    95. }
    96. .calculator .buttons span#clear:active,
    97. .calculator .buttons span#plus:active,
    98. .calculator .buttons span#equal:active
    99. {
    100. box-shadow: 5px 5px 10px rgba(0,0,0,0.1),
    101. -5px -5px 10px #fff,
    102. inset 5px 5px 10px rgba(0,0,0,0.1);
    103. }
    104. .toggleBtn
    105. {
    106. position: fixed;
    107. top: 20px;
    108. right: 20px;
    109. background: #555;
    110. width: 20px;
    111. height: 20px;
    112. border-radius: 50%;
    113. cursor: pointer;
    114. border: 2px solid #edf1f4;
    115. box-shadow: 5px 5px 10px rgba(0,0,0,0.1),
    116. -5px -5px 10px #fff;
    117. }
    118. .dark .toggleBtn
    119. {
    120. background: #edf1f4;
    121. border: 2px solid #333;
    122. box-shadow: 5px 5px 10px rgba(0,0,0,0.5),
    123. -5px -5px 10px rgba(255,255,255,0.25);
    124. }
    125. .dark
    126. {
    127. background: #282c2f;
    128. }
    129. .dark .calculator
    130. {
    131. background: #33393e;
    132. box-shadow: 15px 15px 20px rgba(0,0,0,0.25),
    133. -15px -15px 20px rgba(255,255,255,0.1);
    134. }
    135. .dark .calculator #value
    136. {
    137. color: #eee;
    138. box-shadow: inset 5px 5px 10px rgba(0,0,0,0.5),
    139. inset -5px -5px 20px rgba(255,255,255,0.1);
    140. }
    141. .dark .calculator .buttons span
    142. {
    143. color: #eee;
    144. border: 2px solid #333;
    145. box-shadow: 5px 5px 10px rgba(0,0,0,0.25),
    146. -5px -5px 10px rgba(255,255,255,0.1);
    147. }
    148. .dark .calculator .buttons span:active
    149. {
    150. box-shadow: inset 5px 5px 10px rgba(0,0,0,0.25),
    151. inset -5px -5px 10px rgba(255,255,255,0.1);
    152. }
    153. .dark .calculator .buttons span#clear,
    154. .dark .calculator .buttons span#plus,
    155. .dark .calculator .buttons span#equal
    156. {
    157. border: 2px solid #333;;
    158. }
    159. .dark .calculator .buttons span#clear:active,
    160. .dark .calculator .buttons span#plus:active,
    161. .dark .calculator .buttons span#equal:active
    162. {
    163. box-shadow: inset 5px 5px 10px rgba(0,0,0,0.1);
    164. }

     齿轮loading

    1. html>
    2. <html>
    3. <head>
    4. <meta charset="UTF-8">
    5. <title>CSS3网页齿轮动画加载Loading代码title>
    6. <link rel="stylesheet" href="1.css">
    7. head>
    8. <body>
    9. <div class='loader_overlay'>div>
    10. <div class='loader_cogs'>
    11. <div class='loader_cogs__top'>
    12. <div class='top_part'>div>
    13. <div class='top_part'>div>
    14. <div class='top_part'>div>
    15. <div class='top_hole'>div>
    16. div>
    17. <div class='loader_cogs__left'>
    18. <div class='left_part'>div>
    19. <div class='left_part'>div>
    20. <div class='left_part'>div>
    21. <div class='left_hole'>div>
    22. div>
    23. <div class='loader_cogs__bottom'>
    24. <div class='bottom_part'>div>
    25. <div class='bottom_part'>div>
    26. <div class='bottom_part'>div>
    27. <div class='bottom_hole'>div>
    28. div>
    29. <p>loadingp>
    30. div>
    31. body>
    32. html>

    1. .loader_overlay {
    2. width: 150px;
    3. height: 150px;
    4. background: transparent;
    5. box-shadow: 0px 0px 0px 100vw rgba(121, 114, 114, 0.67),
    6. 0px 0px 19px 0px rgba(0, 0, 0, 0.16) inset;
    7. border-radius: 100%;
    8. z-index: -1;
    9. position: absolute;
    10. left: 0;
    11. right: 0;
    12. top: 0;
    13. bottom: 0;
    14. margin: auto;
    15. }
    16. .loader_cogs {
    17. z-index: -2;
    18. width: 100px;
    19. height: 100px;
    20. top: -120px !important;
    21. position: absolute;
    22. left: 0;
    23. right: 0;
    24. top: 0;
    25. bottom: 0;
    26. margin: auto;
    27. }
    28. .loader_cogs__top {
    29. position: relative;
    30. width: 100px;
    31. height: 100px;
    32. -webkit-transform-origin: 50px 50px;
    33. transform-origin: 50px 50px;
    34. -webkit-animation: rotate 10s infinite linear;
    35. animation: rotate 10s infinite linear;
    36. }
    37. .loader_cogs__top div:nth-of-type(1) {
    38. -webkit-transform: rotate(30deg);
    39. transform: rotate(30deg);
    40. }
    41. .loader_cogs__top div:nth-of-type(2) {
    42. -webkit-transform: rotate(60deg);
    43. transform: rotate(60deg);
    44. }
    45. .loader_cogs__top div:nth-of-type(3) {
    46. -webkit-transform: rotate(90deg);
    47. transform: rotate(90deg);
    48. }
    49. .loader_cogs__top div.top_part {
    50. width: 100px;
    51. border-radius: 10px;
    52. position: absolute;
    53. height: 100px;
    54. background: #f98db9;
    55. }
    56. .loader_cogs__top div.top_hole {
    57. width: 50px;
    58. height: 50px;
    59. border-radius: 100%;
    60. background: white;
    61. position: absolute;
    62. position: absolute;
    63. left: 0;
    64. right: 0;
    65. top: 0;
    66. bottom: 0;
    67. margin: auto;
    68. }
    69. .loader_cogs__left {
    70. position: relative;
    71. width: 80px;
    72. -webkit-transform: rotate(16deg);
    73. transform: rotate(16deg);
    74. top: 28px;
    75. -webkit-transform-origin: 40px 40px;
    76. transform-origin: 40px 40px;
    77. -webkit-animation: rotate_left 10s 0.1s infinite reverse linear;
    78. animation: rotate_left 10s 0.1s infinite reverse linear;
    79. left: -24px;
    80. height: 80px;
    81. }
    82. .loader_cogs__left div:nth-of-type(1) {
    83. -webkit-transform: rotate(30deg);
    84. transform: rotate(30deg);
    85. }
    86. .loader_cogs__left div:nth-of-type(2) {
    87. -webkit-transform: rotate(60deg);
    88. transform: rotate(60deg);
    89. }
    90. .loader_cogs__left div:nth-of-type(3) {
    91. -webkit-transform: rotate(90deg);
    92. transform: rotate(90deg);
    93. }
    94. .loader_cogs__left div.left_part {
    95. width: 80px;
    96. border-radius: 6px;
    97. position: absolute;
    98. height: 80px;
    99. background: #97ddff;
    100. }
    101. .loader_cogs__left div.left_hole {
    102. width: 40px;
    103. height: 40px;
    104. border-radius: 100%;
    105. background: white;
    106. position: absolute;
    107. position: absolute;
    108. left: 0;
    109. right: 0;
    110. top: 0;
    111. bottom: 0;
    112. margin: auto;
    113. }
    114. .loader_cogs__bottom {
    115. position: relative;
    116. width: 60px;
    117. top: -65px;
    118. -webkit-transform-origin: 30px 30px;
    119. transform-origin: 30px 30px;
    120. -webkit-animation: rotate_left 10.2s 0.4s infinite linear;
    121. animation: rotate_left 10.2s 0.4s infinite linear;
    122. -webkit-transform: rotate(4deg);
    123. transform: rotate(4deg);
    124. left: 79px;
    125. height: 60px;
    126. }
    127. .loader_cogs__bottom div:nth-of-type(1) {
    128. -webkit-transform: rotate(30deg);
    129. transform: rotate(30deg);
    130. }
    131. .loader_cogs__bottom div:nth-of-type(2) {
    132. -webkit-transform: rotate(60deg);
    133. transform: rotate(60deg);
    134. }
    135. .loader_cogs__bottom div:nth-of-type(3) {
    136. -webkit-transform: rotate(90deg);
    137. transform: rotate(90deg);
    138. }
    139. .loader_cogs__bottom div.bottom_part {
    140. width: 60px;
    141. border-radius: 5px;
    142. position: absolute;
    143. height: 60px;
    144. background: #ffcd66;
    145. }
    146. .loader_cogs__bottom div.bottom_hole {
    147. width: 30px;
    148. height: 30px;
    149. border-radius: 100%;
    150. background: white;
    151. position: absolute;
    152. position: absolute;
    153. left: 0;
    154. right: 0;
    155. top: 0;
    156. bottom: 0;
    157. margin: auto;
    158. }
    159. /* Animations */
    160. @-webkit-keyframes rotate {
    161. from {
    162. -webkit-transform: rotate(0deg);
    163. transform: rotate(0deg);
    164. }
    165. to {
    166. -webkit-transform: rotate(360deg);
    167. transform: rotate(360deg);
    168. }
    169. }
    170. @keyframes rotate {
    171. from {
    172. -webkit-transform: rotate(0deg);
    173. transform: rotate(0deg);
    174. }
    175. to {
    176. -webkit-transform: rotate(360deg);
    177. transform: rotate(360deg);
    178. }
    179. }
    180. @-webkit-keyframes rotate_left {
    181. from {
    182. -webkit-transform: rotate(16deg);
    183. transform: rotate(16deg);
    184. }
    185. to {
    186. -webkit-transform: rotate(376deg);
    187. transform: rotate(376deg);
    188. }
    189. }
    190. @keyframes rotate_left {
    191. from {
    192. -webkit-transform: rotate(16deg);
    193. transform: rotate(16deg);
    194. }
    195. to {
    196. -webkit-transform: rotate(376deg);
    197. transform: rotate(376deg);
    198. }
    199. }
    200. @-webkit-keyframes rotate_right {
    201. from {
    202. -webkit-transform: rotate(4deg);
    203. transform: rotate(4deg);
    204. }
    205. to {
    206. -webkit-transform: rotate(364deg);
    207. transform: rotate(364deg);
    208. }
    209. }
    210. @keyframes rotate_right {
    211. from {
    212. -webkit-transform: rotate(4deg);
    213. transform: rotate(4deg);
    214. }
    215. to {
    216. -webkit-transform: rotate(364deg);
    217. transform: rotate(364deg);
    218. }
    219. }

    3D 旋转魔方 

    文件较多已上传资源

    新年快乐 大灯笼

    1. <style lang="scss" scoped>
    2. .lantern-box {
    3. display: flex;
    4. flex-direction: column;
    5. align-items: center;
    6. /* 设置旋转点 */
    7. transform-origin: top center;
    8. animation: swing 3s infinite ease-in-out;
    9. position: relative;
    10. z-index: 999;
    11. }
    12. .left {
    13. position: fixed;
    14. left: 20px;
    15. top: 0;
    16. }
    17. .right {
    18. position: fixed;
    19. right: 20px;
    20. top: 0;
    21. }
    22. .lantern-line {
    23. width: 5px;
    24. height: 80px;
    25. background-color: #dc8f03;
    26. }
    27. .lantern-body {
    28. position: relative;
    29. width: 250px;
    30. height: 170px;
    31. background-color: #f00;
    32. border-radius: 120px;
    33. // 水平,垂直,模糊半径,阴影大小,颜色,内阴影
    34. // 可用逗号分隔多个阴影,制作复杂重叠阴影效果
    35. // box-shadow: 0 30px 115px -10px #f00 inset, 0 0 10px #f00;
    36. box-shadow: 0 30px 115px -10px #f00;
    37. /* 设置旋转点 */
    38. transform-origin: top center;
    39. animation: swing 3s infinite ease-in-out;
    40. }
    41. .lantern-body::before {
    42. content: "";
    43. position: absolute;
    44. top: -20px;
    45. left: 50%;
    46. transform: translate(-50%, 0);
    47. width: 100px;
    48. height: 20px;
    49. background-color: #dc8f03;
    50. border-radius: 5px 5px 0 0;
    51. }
    52. .lantern-body::after {
    53. content: "";
    54. position: absolute;
    55. bottom: -20px;
    56. left: 50%;
    57. transform: translate(-50%, 0);
    58. width: 100px;
    59. height: 20px;
    60. background-color: #dc8f03;
    61. border-radius: 0 0 5px 5px;
    62. }
    63. /* 灯笼的动画效果 */
    64. @keyframes swing {
    65. 0% {
    66. transform: rotate(-6deg);
    67. }
    68. 50% {
    69. transform: rotate(6deg);
    70. }
    71. 100% {
    72. transform: rotate(-6deg);
    73. }
    74. }
    75. .lantern-circle {
    76. position: absolute;
    77. top: -5px;
    78. left: 50%;
    79. transform: translate(-50%, 0);
    80. width: 200px;
    81. height: 190px;
    82. border: 2px solid #dc8f03;
    83. border-radius: 50%;
    84. }
    85. .lantern-rect {
    86. display: flex;
    87. flex-direction: column;
    88. position: absolute;
    89. top: -5px;
    90. left: 50%;
    91. transform: translate(-50%, 0);
    92. width: 90px;
    93. height: 240px;
    94. border: 2px solid #dc8f03;
    95. border-radius: 50%;
    96. }
    97. .lantern-text {
    98. position: absolute;
    99. top: 42%;
    100. left: 50%;
    101. transform: translate(-50%, -50%);
    102. font-size: 20px;
    103. font-family: "楷体"; /*设置字体*/
    104. font-size: 64px; /*设置字体大小*/
    105. font-weight: bold; /*设置字体粗细*/
    106. -webkit-text-stroke: 1px rgb(255, 183, 0); /*文字描边*/
    107. -webkit-text-fill-color: transparent; /*设置文字的填充颜色*/
    108. -webkit-animation: shine 3s infinite; /*设置动画 字体阴影闪烁*/
    109. }
    110. @-webkit-keyframes shine {
    111. 0% {
    112. text-shadow: 0 0 5px rgb(255, 183, 0), 0 0 5px rgb(255, 183, 0);
    113. }
    114. 100% {
    115. text-shadow: 0 0 50px rgb(255, 183, 0), 0 0 50px rgb(255, 183, 0);
    116. }
    117. }
    118. .lantern-tassel {
    119. position: absolute;
    120. bottom: -45%;
    121. left: 50%;
    122. transform: translate(-50%, 0);
    123. width: 5px;
    124. height: 75px;
    125. background-color: #dc8f03;
    126. /* 设置旋转点 */
    127. animation: swing 3s infinite ease-in-out;
    128. }
    129. .lantern-tassel::before {
    130. content: "";
    131. position: absolute;
    132. bottom: 0;
    133. left: 50%;
    134. transform: translate(-50%, 0);
    135. width: 30px;
    136. height: 30px;
    137. background-color: #dc8f03;
    138. border-radius: 50%;
    139. }
    140. .lantern-tassel::after {
    141. content: "";
    142. position: absolute;
    143. bottom: -100%;
    144. left: 50%;
    145. transform: translate(-50%, 20%);
    146. width: 20px;
    147. height: 100px;
    148. background-color: #ffa500;
    149. border-radius: 0 0 5px 10px;
    150. }
    151. @media screen and (max-width: 1500px) {
    152. .lantern-box {
    153. display: none;
    154. }
    155. }
    156. style>

    闪动 呼吸灯

    1. 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. <title>Documenttitle>
    8. <style>
    9. body {
    10. background-color: #000;
    11. }
    12. .box {
    13. width: 50px;
    14. height: 50px;
    15. overflow: hidden;
    16. text-overflow: ellipsis;
    17. white-space: nowrap;
    18. background-color: rgb(171, 10, 37);
    19. animation: breath_light 3s ease infinite;
    20. }
    21. @keyframes breath_light {
    22. 0% {
    23. filter: brightness(100%);
    24. }
    25. 50% {
    26. filter: brightness(220%);
    27. }
    28. 100% {
    29. filter: brightness(100%);
    30. }
    31. }
    32. style>
    33. head>
    34. <body>
    35. <div class="box">animation: breath_light 3s ease infinite;div>
    36. body>
    37. html>

     扫描 效果

    1. 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. <title>Documenttitle>
    8. <style>
    9. .container-title-scanning {
    10. position: relative;
    11. overflow: hidden;
    12. &::after {
    13. content: " ";
    14. display: block;
    15. position: absolute;
    16. top: 0;
    17. width: 30px;
    18. height: 100%;
    19. background-image: linear-gradient(to right, transparent 0%, #ff8000 100%);
    20. z-index: -10;
    21. animation: scanning 2s infinite linear;
    22. opacity: 0.7;
    23. }
    24. }
    25. /* 定义一个从左向右的扫描动画 */
    26. @keyframes scanning {
    27. 0% {
    28. left: 0;
    29. opacity: 0.7;
    30. }
    31. 90% {
    32. left: 100%;
    33. opacity: 0.3;
    34. }
    35. 100% {
    36. right: -20px;
    37. opacity: 0;
    38. }
    39. }
    40. style>
    41. head>
    42. <body>
    43. <div class="container-title">
    44. <span class="title-text container-title-scanning">项目分析项目分析项目分析span>
    45. div>
    46. body>
    47. html>

    打赏动画 

    1. 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. <title>Chat-4彩色之外title>
    8. <link rel="shortcut icon" href="/favicon.ico" />
    9. <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js">script>
    10. <style>
    11. #app {
    12. position: relative;
    13. }
    14. .reward-btn {
    15. position: fixed;
    16. top: 5%;
    17. left: 50%;
    18. transform: translate(-50%, -50%);
    19. animation: breath_light 2s infinite;
    20. }
    21. @keyframes breath_light {
    22. 0% {
    23. filter: brightness(100%);
    24. }
    25. 50% {
    26. filter: brightness(80%);
    27. transform: scale(1.1);
    28. }
    29. 100% {
    30. filter: brightness(120%);
    31. }
    32. }
    33. .reward-support {
    34. position: fixed;
    35. top: 0;
    36. left: 0;
    37. width: 100%;
    38. height: 100%;
    39. }
    40. .reward-support .reward-support__card {
    41. position: absolute;
    42. top: 10%;
    43. left: 50%;
    44. transform: translateX(-50%);
    45. width: 300px;
    46. padding: 24px;
    47. border-radius: 12px;
    48. background-color: #f8f8f8;
    49. z-index: 1;
    50. }
    51. .reward-support .reward-support__head {
    52. display: flex;
    53. justify-content: center;
    54. margin-bottom: 14px;
    55. }
    56. .reward-support .reward-support__btn {
    57. width: 65px;
    58. height: 25px;
    59. border: 0;
    60. margin-right: 10px;
    61. border-radius: 6px;
    62. font-size: 14px;
    63. background-color: #ebebeb;
    64. cursor: pointer;
    65. color: #8e8e94;
    66. }
    67. .reward-support .reward-support__QRCode {
    68. width: 163px;
    69. height: 163px;
    70. margin: 0 auto;
    71. background-color: #fff;
    72. }
    73. .reward-support .reward-support__QRCode img {
    74. width: 100%;
    75. }
    76. .reward-support .reward-support__quit {
    77. text-align: center;
    78. }
    79. .reward-support .reward-support__quit span {
    80. width: 120px;
    81. height: 36px;
    82. line-height: 36px;
    83. display: inline-block;
    84. border-radius: 6px;
    85. background-color: #ffffff;
    86. cursor: pointer;
    87. font-size: 14px;
    88. }
    89. .reward-support .reward-support__quit span:hover {
    90. background-color: #ebebeb;
    91. }
    92. .reward-support .reward-support__btn--active {
    93. background-color: #1777ff;
    94. color: #fff;
    95. }
    96. .reward-support .reward-support__shadow {
    97. width: 100%;
    98. height: 100%;
    99. background-color: #7f7f7f;
    100. opacity: 0.7;
    101. }
    102. style>
    103. head>
    104. <body>
    105. <div id="app">
    106. <span class="reward-btn" style="padding: 5px 12px; cursor: pointer" @click="rewardSupportCard = true">🎉span>
    107. <div class="reward-support" v-show="rewardSupportCard">
    108. <div class="reward-support__card">
    109. <div class="reward-support__head">
    110. <button type="button" :class="{ 'reward-support__btn--active': QRCodeModel == 1 }"
    111. class="reward-support__btn" @click="QRCodeModel = 1">
    112. 支付宝
    113. button>
    114. <button type="button" :class="{ 'reward-support__btn--active': QRCodeModel == 2 }"
    115. :style="{ 'backgroundColor': QRCodeModel == 2 ? '#21aa38' : '' }" class="reward-support__btn"
    116. @click="QRCodeModel = 2">
    117. 微信
    118. button>
    119. div>
    120. <div class="reward-support__QRCode" style="margin-bottom: 10px">
    121. <img v-if="QRCodeModel == 1" src="http://project.webcats.cn/bx/43924/11742/assets/zhifubao.jpg"
    122. alt="" />
    123. <img v-else src="http://project.webcats.cn/bx/43924/11742/assets/weixin.jpg" alt="" />
    124. div>
    125. <div style="margin-bottom: 10px; text-align: center; color: #baccbe">
    126. <span v-if="QRCodeModel == 1">支付宝扫一扫span>
    127. <span v-else>微信扫一扫span>
    128. div>
    129. <div class="reward-support__quit">
    130. <span @click="rewardSupportCard = false">下次一定span>
    131. div>
    132. div>
    133. <div class="reward-support__shadow" @click.stop="rewardSupportCard = false">div>
    134. div>
    135. <iframe id="my-iframe" src="https://www.twmm.eu.org/#/" frameborder="0"
    136. style="width: 100%; height: 96vh">iframe>
    137. div>
    138. body>
    139. <script>
    140. const app = new Vue({
    141. el: "#app",
    142. data: {
    143. // 打赏支持
    144. rewardSupportCard: false,
    145. // 1: 支付宝 2: 微信
    146. QRCodeModel: 1,
    147. },
    148. mounted() {
    149. // 禁止打开控制台
    150. document.onkeydown = function (e) {
    151. var currKey = 0, e = e || event || window.event;
    152. currKey = e.keyCode || e.which || e.charCode;
    153. if (currKey == 123) {
    154. window.event.cancelBubble = true;
    155. window.event.returnValue = false;
    156. }
    157. }
    158. // 禁止右键菜单
    159. document.oncontextmenu = function () {
    160. return false;
    161. }
    162. },
    163. });
    164. script>
    165. html>

    黑夜白天切换

    1. html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8" />
    5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    6. <title>Documenttitle>
    7. <style>
    8. /* 全局样式 */
    9. *,
    10. *::before,
    11. *::after {
    12. margin: 0;
    13. padding: 0;
    14. box-sizing: border-box;
    15. }
    16. /* 属性选择器 */
    17. [data-theme="light"] {
    18. --bg-color: #fff;
    19. --text-color: #333;
    20. background-color: #fff;
    21. }
    22. [data-theme="dark"] {
    23. --bg-color: #222;
    24. --text-color: #fff;
    25. /* 解决 在dark模式下,刷新先白屏在变暗问题,加个默认色 */
    26. background-color: #222;
    27. }
    28. body {
    29. background-color: var(--bg-color);
    30. color: var(--text-color);
    31. }
    32. .container {
    33. width: 100%;
    34. height: 100vh;
    35. }
    36. /* 开关样式 */
    37. .switch {
    38. font-size: 17px;
    39. position: fixed;
    40. right: 40px;
    41. top: 25px;
    42. display: inline-block;
    43. width: 64px;
    44. height: 34px;
    45. }
    46. .switch input {
    47. opacity: 0;
    48. width: 0;
    49. height: 0;
    50. }
    51. .slider {
    52. position: absolute;
    53. cursor: pointer;
    54. top: 0;
    55. left: 0;
    56. right: 0;
    57. bottom: 0;
    58. background-color: #73c0fc;
    59. transition: 0.4s;
    60. border-radius: 30px;
    61. }
    62. .slider:before {
    63. position: absolute;
    64. content: "";
    65. height: 30px;
    66. width: 30px;
    67. border-radius: 20px;
    68. left: 2px;
    69. bottom: 2px;
    70. z-index: 2;
    71. background-color: #e8e8e8;
    72. transition: 0.4s;
    73. }
    74. .sun svg {
    75. position: absolute;
    76. top: 6px;
    77. left: 36px;
    78. z-index: 1;
    79. width: 24px;
    80. height: 24px;
    81. }
    82. .moon svg {
    83. fill: #73c0fc;
    84. position: absolute;
    85. top: 5px;
    86. left: 5px;
    87. z-index: 1;
    88. width: 24px;
    89. height: 24px;
    90. }
    91. .input:checked+.slider {
    92. background-color: #183153;
    93. }
    94. .input:focus+.slider {
    95. box-shadow: 0 0 1px #183153;
    96. }
    97. .input:checked+.slider:before {
    98. transform: translateX(30px);
    99. }
    100. style>
    101. head>
    102. <body>
    103. <div class="wrapper">
    104. <label class="switch">
    105. <span class="sun"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
    106. <g fill="#ffd43b">
    107. <circle r="5" cy="12" cx="12">circle>
    108. <path
    109. d="m21 13h-1a1 1 0 0 1 0-2h1a1 1 0 0 1 0 2zm-17 0h-1a1 1 0 0 1 0-2h1a1 1 0 0 1 0 2zm13.66-5.66a1 1 0 0 1 -.66-.29 1 1 0 0 1 0-1.41l.71-.71a1 1 0 1 1 1.41 1.41l-.71.71a1 1 0 0 1 -.75.29zm-12.02 12.02a1 1 0 0 1 -.71-.29 1 1 0 0 1 0-1.41l.71-.66a1 1 0 0 1 1.41 1.41l-.71.71a1 1 0 0 1 -.7.24zm6.36-14.36a1 1 0 0 1 -1-1v-1a1 1 0 0 1 2 0v1a1 1 0 0 1 -1 1zm0 17a1 1 0 0 1 -1-1v-1a1 1 0 0 1 2 0v1a1 1 0 0 1 -1 1zm-5.66-14.66a1 1 0 0 1 -.7-.29l-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 1 0 1.41 1 1 0 0 1 -.71.29zm12.02 12.02a1 1 0 0 1 -.7-.29l-.66-.71a1 1 0 0 1 1.36-1.36l.71.71a1 1 0 0 1 0 1.41 1 1 0 0 1 -.71.24z">
    110. path>
    111. g>
    112. svg>span>
    113. <span class="moon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">
    114. <path
    115. d="m223.5 32c-123.5 0-223.5 100.3-223.5 224s100 224 223.5 224c60.6 0 115.5-24.2 155.8-63.4 5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6-96.9 0-175.5-78.8-175.5-176 0-65.8 36-123.1 89.3-153.3 6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z">
    116. path>
    117. svg>
    118. span>
    119. <input type="checkbox" class="input" />
    120. <span class="slider">span>
    121. label>
    122. div>
    123. <div class="container">
    124. <img src="https://pic1.58cdn.com.cn/anjuke_58/337f2d80b07ba0b29f667c29536fb775" style="width: 500px" />
    125. 我是一个测试文字
    126. div>
    127. <script>
    128. // 获取input元素
    129. const toggleSwitch = document.querySelector(".input");
    130. // 手动切换主题
    131. function switchTheme(event) {
    132. if (event.target.checked) {
    133. // 设置css变量
    134. document.documentElement.setAttribute("data-theme", "dark");
    135. // 存入本地
    136. localStorage.setItem("theme", "dark");
    137. } else {
    138. document.documentElement.setAttribute("data-theme", "light");
    139. localStorage.setItem("theme", "light");
    140. }
    141. }
    142. // 监听input元素
    143. toggleSwitch.addEventListener("change", switchTheme, false);
    144. /**
    145. * 默认展示 light
    146. *`DOMContentLoaded` 事件在 HTML 文档解析完成后就会触发,不用等待图片和其他资源都加载完成。
    147. *而 `window.onload` 事件会在整个页面及其包含的所有资源(如图片、样式表等)都加载完成后才会触发。
    148. *因此,`DOMContentLoaded` 事件触发的时机早于 `window.onload`,可以在一些不需要等待所有资源加载完成的场景下使用。
    149. *`window.onload` 适用于需要等页面包括所有图片、样式表等资源都加载完成后再执行的情况。
    150. * @lastFixDate 2023/06/13 17:42:35
    151. */
    152. window.addEventListener("DOMContentLoaded", function () {
    153. // 获取本地存储的主题
    154. const currentTheme = localStorage.getItem("theme");
    155. // 如果有本地存储的主题,则设置为当前主题
    156. if (currentTheme) {
    157. document.documentElement.setAttribute("data-theme", currentTheme);
    158. // 如果是 dark 主题,则将 switch 开关设置为 checked 状态
    159. if (currentTheme === "dark") {
    160. toggleSwitch.checked = true;
    161. }
    162. } else {
    163. // 如果没有本地存储的主题,则设置 dark 模式
    164. document.documentElement.setAttribute("data-theme", "dark");
    165. toggleSwitch.checked = true;
    166. }
    167. // 隐藏加载提示,显示页面内容
    168. document.querySelector(".loading").style.display = "none";
    169. container.style.display = "block";
    170. });
    171. script>
    172. body>
    173. html>

    模块选择

    1. html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    6. <title>Chat4移动版下载-彩色之外title>
    7. <style>
    8. .main_back {
    9. position: absolute;
    10. border-radius: 10px;
    11. transform: rotate(90deg);
    12. width: 11em;
    13. height: 11em;
    14. background: linear-gradient(270deg, #03a9f4, #cc39a4, #ffb5d2);
    15. z-index: -2;
    16. box-shadow: inset 0px 0px 180px 5px #ffffff;
    17. }
    18. .cantainer {
    19. display: block;
    20. margin: 50px 0 0 200px;
    21. padding: 15px;
    22. width: fit-content;
    23. height: fit-content;
    24. }
    25. .welcome {
    26. /* 渐变字体 */
    27. background: linear-gradient(270deg, #03a9f4, #cc39a4, #ffb5d2);
    28. -webkit-background-clip: text;
    29. -webkit-text-fill-color: transparent;
    30. font-size: 2.5em;
    31. }
    32. .info {
    33. font-size: 14px;
    34. color: #200505;
    35. }
    36. .main {
    37. margin: 200px auto;
    38. display: flex;
    39. flex-wrap: wrap;
    40. width: 14em;
    41. align-items: center;
    42. justify-content: center;
    43. z-index: -1;
    44. }
    45. .card {
    46. width: 60px;
    47. height: 60px;
    48. border-top-left-radius: 10px;
    49. background: lightgrey;
    50. transition: .4s ease-in-out, .2s background-color ease-in-out, .2s background-image ease-in-out;
    51. background: rgba(255, 255, 255, 0.596);
    52. backdrop-filter: blur(5px);
    53. border: 1px solid transparent;
    54. -webkit-backdrop-filter: blur(5px);
    55. display: flex;
    56. align-items: center;
    57. justify-content: center;
    58. }
    59. .card .instagram {
    60. opacity: 0;
    61. transition: .2s ease-in-out;
    62. fill: #cc39a4;
    63. }
    64. .card:nth-child(2) {
    65. border-radius: 0px;
    66. }
    67. .card:nth-child(2) .twitter {
    68. opacity: 0;
    69. transition: .2s ease-in-out;
    70. fill: #03A9F4;
    71. }
    72. .card:nth-child(3) {
    73. border-top-right-radius: 10px;
    74. border-top-left-radius: 0px;
    75. }
    76. .card:nth-child(3) .dribble {
    77. opacity: 0;
    78. transition: .2s ease-in-out;
    79. fill: #ffb5d2;
    80. }
    81. .card:nth-child(4) {
    82. border-radius: 0px;
    83. }
    84. .card:nth-child(4) .codepen {
    85. opacity: 0;
    86. transition: .2s ease-in-out;
    87. fill: black;
    88. }
    89. .card:nth-child(5) {
    90. border-radius: 0px;
    91. }
    92. .card:nth-child(5) .uiverse {
    93. position: absolute;
    94. margin-left: 0.2em;
    95. margin-top: 0.2em;
    96. opacity: 0;
    97. transition: .2s ease-in-out;
    98. }
    99. .card:nth-child(6) {
    100. border-radius: 0px;
    101. }
    102. .card:nth-child(6) .discord {
    103. opacity: 0;
    104. transition: .2s ease-in-out;
    105. fill: #8c9eff;
    106. }
    107. .card:nth-child(7) {
    108. border-bottom-left-radius: 10px;
    109. border-top-left-radius: 0px;
    110. }
    111. .card:nth-child(7) .github {
    112. opacity: 0;
    113. transition: .2s ease-in-out;
    114. fill: black;
    115. }
    116. .card:nth-child(8) {
    117. border-radius: 0px;
    118. }
    119. .card:nth-child(8) .telegram {
    120. opacity: 0;
    121. transition: .2s ease-in-out;
    122. fill: #29b6f6;
    123. }
    124. .card:nth-child(9) {
    125. border-bottom-right-radius: 10px;
    126. border-top-left-radius: 0px;
    127. }
    128. .card:nth-child(9) .reddit {
    129. opacity: 0;
    130. transition: .2s ease-in-out;
    131. }
    132. .main:hover {
    133. width: 14em;
    134. cursor: pointer;
    135. }
    136. .main:hover .main_back {
    137. opacity: 0;
    138. }
    139. .main:hover .card {
    140. margin: .2em;
    141. border-radius: 10px;
    142. box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    143. border: 1px solid rgba(255, 255, 255, 0.3);
    144. background: rgba(255, 255, 255, 0.2);
    145. }
    146. .main:hover .card:nth-child(5) {
    147. border: transparent;
    148. }
    149. .main:hover .text {
    150. opacity: 0;
    151. z-index: -3;
    152. }
    153. .main:hover .instagram {
    154. opacity: 1;
    155. }
    156. .main:hover .twitter {
    157. opacity: 1;
    158. }
    159. .main:hover .dribble {
    160. opacity: 1;
    161. }
    162. .main:hover .codepen {
    163. opacity: 1;
    164. }
    165. .main:hover .uiverse {
    166. opacity: 1;
    167. }
    168. .main:hover .discord {
    169. opacity: 1;
    170. }
    171. .main:hover .github {
    172. opacity: 1;
    173. }
    174. .main:hover .telegram {
    175. opacity: 1;
    176. }
    177. .main:hover .reddit {
    178. opacity: 1;
    179. }
    180. .card:nth-child(1):hover {
    181. background-color: #cc39a4;
    182. }
    183. .card:nth-child(1):hover .instagram {
    184. fill: white;
    185. }
    186. .card:nth-child(2):hover {
    187. background-color: #03A9F4;
    188. }
    189. .card:nth-child(2):hover .twitter {
    190. fill: white;
    191. }
    192. .card:nth-child(3):hover {
    193. background-color: #ffb5d2;
    194. }
    195. .card:nth-child(3):hover .dribble {
    196. fill: white;
    197. }
    198. .card:nth-child(4):hover {
    199. background-color: #1E1F26;
    200. }
    201. .card:nth-child(4):hover .codepen {
    202. fill: white;
    203. }
    204. .card:nth-child(5):hover {
    205. animation: backgroundIMG .1s;
    206. animation-fill-mode: forwards;
    207. }
    208. .card:nth-child(5):hover .uiverse #paint0_linear_501_142 stop {
    209. stop-color: white;
    210. }
    211. .card:nth-child(5):hover .uiverse #paint1_linear_501_142 stop {
    212. stop-color: white;
    213. }
    214. .card:nth-child(5):hover .uiverse #paint2_linear_501_142 stop {
    215. stop-color: white;
    216. }
    217. @keyframes backgroundIMG {
    218. 100% {
    219. background-image: linear-gradient(#BF66FF, #6248FF, #00DDEB);
    220. }
    221. }
    222. .card:nth-child(6):hover {
    223. background-color: #8c9eff;
    224. }
    225. .card:nth-child(6):hover .discord {
    226. fill: white;
    227. }
    228. .card:nth-child(7):hover {
    229. background-color: black;
    230. }
    231. .card:nth-child(7):hover .github {
    232. fill: white;
    233. }
    234. .card:nth-child(8):hover {
    235. background-color: #29b6f6;
    236. }
    237. .card:nth-child(8):hover .telegram>path:nth-of-type(1) {
    238. fill: white;
    239. }
    240. .card:nth-child(8):hover .telegram>path:nth-of-type(2) {
    241. fill: #29b6f6;
    242. }
    243. .card:nth-child(8):hover .telegram>path:nth-of-type(3) {
    244. fill: #29b6f6;
    245. }
    246. .card:nth-child(9):hover {
    247. background-color: rgb(255, 69, 0);
    248. }
    249. .card:nth-child(9) .reddit>g circle {
    250. fill: rgb(255, 69, 0);
    251. }
    252. .card:nth-child(9) .reddit>g path {
    253. fill: white;
    254. }
    255. .text {
    256. position: absolute;
    257. font-size: 0.7em;
    258. transition: .4s ease-in-out;
    259. color: black;
    260. text-align: center;
    261. font-weight: bold;
    262. letter-spacing: 0.33em;
    263. z-index: 3;
    264. }
    265. style>
    266. head>
    267. <body>
    268. <div class="cantainer">
    269. <h1 class="welcome">欢迎来到彩色之外,您好h1>
    270. <div class="info">其余ICON,更多功能在开发,请您点击中间UI,或者点击GitHub查阅文档div>
    271. div>
    272. <div class="main">
    273. <div class="card">
    274. <svg fill-rule="nonzero" height="30px" width="30px" viewBox="0,0,256,256"
    275. xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="instagram">
    276. <g style="mix-blend-mode: normal" text-anchor="none" font-size="none" font-weight="none"
    277. font-family="none" stroke-dashoffset="0" stroke-dasharray="" stroke-miterlimit="10"
    278. stroke-linejoin="miter" stroke-linecap="butt" stroke-width="1" stroke="none" fill-rule="nonzero">
    279. <g transform="scale(8,8)">
    280. <path
    281. d="M11.46875,5c-3.55078,0 -6.46875,2.91406 -6.46875,6.46875v9.0625c0,3.55078 2.91406,6.46875 6.46875,6.46875h9.0625c3.55078,0 6.46875,-2.91406 6.46875,-6.46875v-9.0625c0,-3.55078 -2.91406,-6.46875 -6.46875,-6.46875zM11.46875,7h9.0625c2.47266,0 4.46875,1.99609 4.46875,4.46875v9.0625c0,2.47266 -1.99609,4.46875 -4.46875,4.46875h-9.0625c-2.47266,0 -4.46875,-1.99609 -4.46875,-4.46875v-9.0625c0,-2.47266 1.99609,-4.46875 4.46875,-4.46875zM21.90625,9.1875c-0.50391,0 -0.90625,0.40234 -0.90625,0.90625c0,0.50391 0.40234,0.90625 0.90625,0.90625c0.50391,0 0.90625,-0.40234 0.90625,-0.90625c0,-0.50391 -0.40234,-0.90625 -0.90625,-0.90625zM16,10c-3.30078,0 -6,2.69922 -6,6c0,3.30078 2.69922,6 6,6c3.30078,0 6,-2.69922 6,-6c0,-3.30078 -2.69922,-6 -6,-6zM16,12c2.22266,0 4,1.77734 4,4c0,2.22266 -1.77734,4 -4,4c-2.22266,0 -4,-1.77734 -4,-4c0,-2.22266 1.77734,-4 4,-4z">
    282. path>
    283. g>
    284. g>
    285. svg>
    286. div>
    287. <div class="card">
    288. <svg height="30px" width="30px" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" class="twitter">
    289. <path
    290. d="M42,12.429c-1.323,0.586-2.746,0.977-4.247,1.162c1.526-0.906,2.7-2.351,3.251-4.058c-1.428,0.837-3.01,1.452-4.693,1.776C34.967,9.884,33.05,9,30.926,9c-4.08,0-7.387,3.278-7.387,7.32c0,0.572,0.067,1.129,0.193,1.67c-6.138-0.308-11.582-3.226-15.224-7.654c-0.64,1.082-1,2.349-1,3.686c0,2.541,1.301,4.778,3.285,6.096c-1.211-0.037-2.351-0.374-3.349-0.914c0,0.022,0,0.055,0,0.086c0,3.551,2.547,6.508,5.923,7.181c-0.617,0.169-1.269,0.263-1.941,0.263c-0.477,0-0.942-0.054-1.392-0.135c0.94,2.902,3.667,5.023,6.898,5.086c-2.528,1.96-5.712,3.134-9.174,3.134c-0.598,0-1.183-0.034-1.761-0.104C9.268,36.786,13.152,38,17.321,38c13.585,0,21.017-11.156,21.017-20.834c0-0.317-0.01-0.633-0.025-0.945C39.763,15.197,41.013,13.905,42,12.429">
    291. path>
    292. svg>
    293. div>
    294. <div class="card">
    295. <svg height="30px" width="30px" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg" class="dribble">
    296. <path
    297. d="M20,38.5C9.799,38.5,1.5,30.201,1.5,20S9.799,1.5,20,1.5S38.5,9.799,38.5,20S30.201,38.5,20,38.5z">
    298. path>
    299. <path
    300. d="M20,2c9.925,0,18,8.075,18,18s-8.075,18-18,18S2,29.925,2,20S10.075,2,20,2 M20,1 C9.507,1,1,9.507,1,20s8.507,19,19,19s19-8.507,19-19S30.493,1,20,1L20,1z"
    301. fill="#ea4c89">path>
    302. <path
    303. d="M28.352 36.914c0 0-3.032-21.087-15.63-34.292M1.269 17.848c0 0 24.2 2.117 32.075-11.102M7.804 34.152c0 0 8.624-19.807 31.058-12.194"
    304. stroke-miterlimit="10" stroke="#ea4c89" fill="none">path>
    305. svg>
    306. div>
    307. <div class="card">
    308. <svg height="30px" width="30px" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" class="codepen">
    309. <path
    310. d="M 25 4 L 4 17.34375 L 4 32.652344 L 25 46 L 46 32.65625 L 46 17.34375 Z M 25 29.183594 L 19.066406 25.070313 L 25 21.023438 L 30.933594 25.070313 Z M 27 17.605469 L 27 9.949219 L 40.429688 18.484375 L 34.410156 22.65625 Z M 23 17.605469 L 15.589844 22.65625 L 9.570313 18.484375 L 23 9.949219 Z M 12.09375 25.042969 L 8 27.832031 L 8 22.203125 Z M 15.570313 27.453125 L 23 32.605469 L 23 40.050781 L 9.589844 31.527344 Z M 27 32.605469 L 34.429688 27.453125 L 40.410156 31.527344 L 27 40.050781 Z M 37.90625 25.042969 L 42 22.203125 L 42 27.832031 Z">
    311. path>
    312. svg>
    313. div>
    314. <div class="card" title="下载">
    315. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" height="23x" width="23px" class="uiverse">
    316. <path fill="url(#paint0_linear_501_142)"
    317. d="M38.0481 4.82927C38.0481 2.16214 40.018 0 42.4481 0H51.2391C53.6692 0 55.6391 2.16214 55.6391 4.82927V40.1401C55.6391 48.8912 53.2343 55.6657 48.4248 60.4636C43.6153 65.2277 36.7304 67.6098 27.7701 67.6098C18.8099 67.6098 11.925 65.2953 7.11548 60.6663C2.37183 56.0036 3.8147e-06 49.2967 3.8147e-06 40.5456V4.82927C3.8147e-06 2.16213 1.96995 0 4.4 0H13.2405C15.6705 0 17.6405 2.16214 17.6405 4.82927V39.1265C17.6405 43.7892 18.4805 47.2018 20.1605 49.3642C21.8735 51.5267 24.4759 52.6079 27.9678 52.6079C31.4596 52.6079 34.0127 51.5436 35.6268 49.4149C37.241 47.2863 38.0481 43.8399 38.0481 39.0758V4.82927Z">
    318. path>
    319. <path fill="url(#paint1_linear_501_142)"
    320. d="M86.9 61.8682C86.9 64.5353 84.9301 66.6975 82.5 66.6975H73.6595C71.2295 66.6975 69.2595 64.5353 69.2595 61.8682V4.82927C69.2595 2.16214 71.2295 0 73.6595 0H82.5C84.9301 0 86.9 2.16214 86.9 4.82927V61.8682Z">
    321. path>
    322. <path fill="url(#paint2_linear_501_142)"
    323. d="M2.86102e-06 83.2195C2.86102e-06 80.5524 1.96995 78.3902 4.4 78.3902H83.6C86.0301 78.3902 88 80.5524 88 83.2195V89.1707C88 91.8379 86.0301 94 83.6 94H4.4C1.96995 94 0 91.8379 0 89.1707L2.86102e-06 83.2195Z">
    324. path>
    325. <defs>
    326. <linearGradient gradientUnits="userSpaceOnUse" y2="87.6201" x2="96.1684" y1="0" x1="0"
    327. id="paint0_linear_501_142">
    328. <stop stop-color="#BF66FF">stop>
    329. <stop stop-color="#6248FF" offset="0.510417">stop>
    330. <stop stop-color="#00DDEB" offset="1">stop>
    331. linearGradient>
    332. <linearGradient gradientUnits="userSpaceOnUse" y2="87.6201" x2="96.1684" y1="0" x1="0"
    333. id="paint1_linear_501_142">
    334. <stop stop-color="#BF66FF">stop>
    335. <stop stop-color="#6248FF" offset="0.510417">stop>
    336. <stop stop-color="#00DDEB" offset="1">stop>
    337. linearGradient>
    338. <linearGradient gradientUnits="userSpaceOnUse" y2="87.6201" x2="96.1684" y1="0" x1="0"
    339. id="paint2_linear_501_142">
    340. <stop stop-color="#BF66FF">stop>
    341. <stop stop-color="#6248FF" offset="0.510417">stop>
    342. <stop stop-color="#00DDEB" offset="1">stop>
    343. linearGradient>
    344. defs>
    345. svg>
    346. div>
    347. <div class="card">
    348. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="30px" height="30px" class="discord">
    349. <path
    350. d="M40,12c0,0-4.585-3.588-10-4l-0.488,0.976C34.408,10.174,36.654,11.891,39,14c-4.045-2.065-8.039-4-15-4s-10.955,1.935-15,4c2.346-2.109,5.018-4.015,9.488-5.024L18,8c-5.681,0.537-10,4-10,4s-5.121,7.425-6,22c5.162,5.953,13,6,13,6l1.639-2.185C13.857,36.848,10.715,35.121,8,32c3.238,2.45,8.125,5,16,5s12.762-2.55,16-5c-2.715,3.121-5.857,4.848-8.639,5.815L33,40c0,0,7.838-0.047,13-6C45.121,19.425,40,12,40,12z M17.5,30c-1.933,0-3.5-1.791-3.5-4c0-2.209,1.567-4,3.5-4s3.5,1.791,3.5,4C21,28.209,19.433,30,17.5,30z M30.5,30c-1.933,0-3.5-1.791-3.5-4c0-2.209,1.567-4,3.5-4s3.5,1.791,3.5,4C34,28.209,32.433,30,30.5,30z">
    351. path>
    352. svg>
    353. div>
    354. <div class="card" title="博文">
    355. <svg height="30px" width="30px" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg" class="github">
    356. <path
    357. d="M15,3C8.373,3,3,8.373,3,15c0,5.623,3.872,10.328,9.092,11.63C12.036,26.468,12,26.28,12,26.047v-2.051 c-0.487,0-1.303,0-1.508,0c-0.821,0-1.551-0.353-1.905-1.009c-0.393-0.729-0.461-1.844-1.435-2.526 c-0.289-0.227-0.069-0.486,0.264-0.451c0.615,0.174,1.125,0.596,1.605,1.222c0.478,0.627,0.703,0.769,1.596,0.769 c0.433,0,1.081-0.025,1.691-0.121c0.328-0.833,0.895-1.6,1.588-1.962c-3.996-0.411-5.903-2.399-5.903-5.098 c0-1.162,0.495-2.286,1.336-3.233C9.053,10.647,8.706,8.73,9.435,8c1.798,0,2.885,1.166,3.146,1.481C13.477,9.174,14.461,9,15.495,9 c1.036,0,2.024,0.174,2.922,0.483C18.675,9.17,19.763,8,21.565,8c0.732,0.731,0.381,2.656,0.102,3.594 c0.836,0.945,1.328,2.066,1.328,3.226c0,2.697-1.904,4.684-5.894,5.097C18.199,20.49,19,22.1,19,23.313v2.734 c0,0.104-0.023,0.179-0.035,0.268C23.641,24.676,27,20.236,27,15C27,8.373,21.627,3,15,3z">
    358. path>
    359. svg>
    360. div>
    361. <div class="card">
    362. <svg height="30px" width="30px" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" class="telegram">
    363. <path d="M24 4A20 20 0 1 0 24 44A20 20 0 1 0 24 4Z">path>
    364. <path
    365. d="M33.95,15l-3.746,19.126c0,0-0.161,0.874-1.245,0.874c-0.576,0-0.873-0.274-0.873-0.274l-8.114-6.733 l-3.97-2.001l-5.095-1.355c0,0-0.907-0.262-0.907-1.012c0-0.625,0.933-0.923,0.933-0.923l21.316-8.468 c-0.001-0.001,0.651-0.235,1.126-0.234C33.667,14,34,14.125,34,14.5C34,14.75,33.95,15,33.95,15z"
    366. fill="#fff">path>
    367. <path
    368. d="M23,30.505l-3.426,3.374c0,0-0.149,0.115-0.348,0.12c-0.069,0.002-0.143-0.009-0.219-0.043 l0.964-5.965L23,30.505z"
    369. fill="#b0bec5">path>
    370. <path
    371. d="M29.897,18.196c-0.169-0.22-0.481-0.26-0.701-0.093L16,26c0,0,2.106,5.892,2.427,6.912 c0.322,1.021,0.58,1.045,0.58,1.045l0.964-5.965l9.832-9.096C30.023,18.729,30.064,18.416,29.897,18.196z"
    372. fill="#cfd8dc">path>
    373. svg>
    374. div>
    375. <div class="card">
    376. <svg xml:space="preserve" viewBox="0 0 256 256" height="30" width="30" version="1.1"
    377. xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="reddit">
    378. <defs>
    379. defs>
    380. <g transform="translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)"
    381. style="stroke: none; border-radius:50%; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;">
    382. <circle transform="matrix(1 0 0 1 0 0)"
    383. style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
    384. r="45" cy="45" cx="45">circle>
    385. <path stroke-linecap="round" transform="matrix(1 0 0 1 0 0)"
    386. style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
    387. d="M 75.011 45 c -0.134 -3.624 -3.177 -6.454 -6.812 -6.331 c -1.611 0.056 -3.143 0.716 -4.306 1.823 c -5.123 -3.49 -11.141 -5.403 -17.327 -5.537 l 2.919 -14.038 l 9.631 2.025 c 0.268 2.472 2.483 4.262 4.955 3.993 c 2.472 -0.268 4.262 -2.483 3.993 -4.955 s -2.483 -4.262 -4.955 -3.993 c -1.421 0.145 -2.696 0.973 -3.4 2.204 L 48.68 17.987 c -0.749 -0.168 -1.499 0.302 -1.667 1.063 c 0 0.011 0 0.011 0 0.022 l -3.322 15.615 c -6.264 0.101 -12.36 2.025 -17.55 5.537 c -2.64 -2.483 -6.801 -2.36 -9.284 0.291 c -2.483 2.64 -2.36 6.801 0.291 9.284 c 0.515 0.481 1.107 0.895 1.767 1.186 c -0.045 0.66 -0.045 1.32 0 1.98 c 0 10.078 11.745 18.277 26.23 18.277 c 14.485 0 26.23 -8.188 26.23 -18.277 c 0.045 -0.66 0.045 -1.32 0 -1.98 C 73.635 49.855 75.056 47.528 75.011 45 z M 30.011 49.508 c 0 -2.483 2.025 -4.508 4.508 -4.508 c 2.483 0 4.508 2.025 4.508 4.508 s -2.025 4.508 -4.508 4.508 C 32.025 53.993 30.011 51.991 30.011 49.508 z M 56.152 62.058 v -0.179 c -3.199 2.405 -7.114 3.635 -11.119 3.468 c -4.005 0.168 -7.919 -1.063 -11.119 -3.468 c -0.425 -0.515 -0.347 -1.286 0.168 -1.711 c 0.447 -0.369 1.085 -0.369 1.544 0 c 2.707 1.98 6.007 2.987 9.362 2.83 c 3.356 0.179 6.667 -0.783 9.407 -2.74 c 0.492 -0.481 1.297 -0.47 1.779 0.022 C 56.655 60.772 56.644 61.577 56.152 62.058 z M 55.537 54.34 c -0.078 0 -0.145 0 -0.224 0 l 0.034 -0.168 c -2.483 0 -4.508 -2.025 -4.508 -4.508 s 2.025 -4.508 4.508 -4.508 s 4.508 2.025 4.508 4.508 C 59.955 52.148 58.02 54.239 55.537 54.34 z">
    388. path>
    389. g>
    390. svg>
    391. div>
    392. <p class="text">HOVER<br><br>FOR<br><br>SOCIALp>
    393. <div class="main_back">div>
    394. div>
    395. <script>
    396. // 点击github图标跳转到github
    397. document.querySelector('.github').onclick = function () {
    398. window.open('https://blog.csdn.net/m0_57904695/article/details/129950163');
    399. }
    400. // 点击uiverse图标跳转到uiverse
    401. document.querySelector('.uiverse').onclick = function () {
    402. // window.open('https://blog.csdn.net/m0_57904695/article/details/129950163');
    403. // 在当前页面打开
    404. window.location.href = 'http://project.webcats.cn/bx/43924/11808/Chat-4-AI v1.21.apk';
    405. }
    406. script>
    407. body>
    408. html>

  • 相关阅读:
    xml转txt出现以下报错该如何解决
    数据结构——树(树的概念、优缺点、二叉树)
    基于JAVA社区养老服务管理系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署
    HDFS 高可用分布式环境搭建
    Stable Diffusion进阶玩法说明
    Kubernetes v1.25 源码编译
    【云原生之kubernetes实战】在k8s环境下部署OrangeHRM人力资源管理系统
    java计算机毕业设计基于ssm的校园二手短期闲置资源置换平台(源代码+数据库+Lw文档)
    教师工作量管理系统思路(链表应用)
    Java 对象内存占用分析
  • 原文地址:https://blog.csdn.net/m0_57904695/article/details/127846345