效果图

normal video (1).mp4 (327.52KB).mp4%22%2C%22size%22%3A335382%2C%22percent%22%3A100%2C%22taskId%22%3A%22D8ciKN1MBYAE%22%2C%22margin%22%3Atrue%2C%22id%22%3A%228CFn1%22%2C%22videoId%22%3A%22inputs%2Fprod%2Fyuque%2F2020%2F338969%2Fmp4%2F1606374511358-0955bbd3-7d3c-435a-9826-ccd124bfbd01.mp4%22%2C%22card%22%3A%22video%22%7D#8CFn1)

代码实现

  1. <!DOCTYPE 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>Document</title>
  7. <style>
  8. body {
  9. display: flex;
  10. justify-content: center;
  11. align-items: center;
  12. }
  13. .miusicFa {
  14. padding: 0;
  15. list-style: none;
  16. width: 104px;
  17. height: 104px;
  18. display: flex;
  19. justify-content: center;
  20. align-items: center;
  21. background: #0086FF;
  22. border-radius: 50%;
  23. }
  24. li {
  25. width: 0.08rem;
  26. height: 0.2rem;
  27. margin-left: 0.06rem;
  28. border-radius: 0.04rem;
  29. background: #fff;
  30. }
  31. li:first-child {
  32. margin-left: 0;
  33. }
  34. .m1 {
  35. animation: 0.8s 0.1s living linear infinite backwards normal;
  36. animation-delay: -1.1s;
  37. }
  38. .m2 {
  39. animation: 0.8s 0.3s living linear infinite backwards normal;
  40. animation-delay: -1.3s;
  41. }
  42. .m3 {
  43. animation: 0.8s 0.6s living linear infinite backwards normal;
  44. animation-delay: -1.6s;
  45. }
  46. @keyframes living {
  47. 0% {
  48. transform: scaleY(0.5);
  49. transform-origin: 0 .21rem;
  50. }
  51. 20% {
  52. transform: scaleY(1);
  53. transform-origin: 0 .21rem;
  54. }
  55. 40% {
  56. transform: scaleY(1.5);
  57. transform-origin: 0 .21rem;
  58. }
  59. 60% {
  60. transform: scaleY(2);
  61. transform-origin: 0 .21rem;
  62. }
  63. 80% {
  64. transform: scaleY(1.5);
  65. transform-origin: 0 .21rem;
  66. }
  67. 100% {
  68. transform: scaleY(1);
  69. transform-origin: 0 .21rem;
  70. }
  71. }
  72. </style>
  73. <script>
  74. !function (global) {
  75. var window = global || this,
  76. width = 720 / 2,
  77. docEl = window.document.documentElement,
  78. dpr = window.devicePixelRatio || 1,
  79. resizeEvt = 'resize',
  80. resizeCall = (function () {
  81. var clientWidth = docEl.clientWidth;
  82. if (!clientWidth) {
  83. docEl.style.fontSize = 100 + 'px';
  84. } else {
  85. clientWidth < 720 ? docEl.style.fontSize = 50 * (clientWidth / width) + 'px' : docEl.style.fontSize = '75px';
  86. }
  87. return arguments.callee;
  88. })();
  89. dpr = dpr >= 3 ? 3 : dpr >= 2 ? 2 : 1;
  90. docEl.setAttribute('data-dpr', dpr);
  91. window.addEventListener && window.addEventListener(resizeEvt, resizeCall, false);
  92. }(this);
  93. </script>
  94. </head>
  95. <body>
  96. <ul class="miusicFa">
  97. <li class="m1"></li>
  98. <li class="m2"></li>
  99. <li class="m3"></li>
  100. </ul>
  101. </body>
  102. </html>