Guest User

Untitled

a guest
Feb 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Bars waves</title>
  6. </head>
  7. <body style="background: #545454">
  8. <div class="animated-bars">
  9. <div class="bar"></div>
  10. <div class="bar"></div>
  11. <div class="bar"></div>
  12. <div class="bar"></div>
  13. <div class="bar"></div>
  14. </div>
  15.  
  16. <style>
  17. * {
  18. margin: 0;
  19. padding: 0;
  20. }
  21. body {
  22. display: flex;
  23. justify-content: center;
  24. align-items: center;
  25. height: 100vh;
  26. }
  27. .animated-bars {
  28. width: 100px;
  29. height: 50px;
  30. display: flex;
  31. justify-content: space-between;
  32. }
  33.  
  34. .animated-bars .bar {
  35. background: #ccc;
  36. height: 100%;
  37. width: 10px;
  38. border-radius: 5px;
  39. position: relative;
  40. bottom: -50%;
  41.  
  42. animation-timing-function: linear;
  43. animation-iteration-count: infinite;
  44. animation-direction: alternate;
  45. animation-duration: 0.5s;
  46. }
  47.  
  48. .animated-bars .bar:nth-of-type(3) {
  49. animation-name: bar-wave-full;
  50. height: 80px;
  51. bottom: -60%;
  52. }
  53.  
  54. .animated-bars .bar:nth-of-type(1),
  55. .animated-bars .bar:nth-of-type(5) {
  56. height: 100%;
  57. bottom: -50%;
  58. animation-name: bar-wave-one-third;
  59. }
  60.  
  61. .animated-bars .bar:nth-of-type(2),
  62. .animated-bars .bar:nth-of-type(4) {
  63. height: 90%;
  64. bottom: -55%;
  65. animation-name: bar-wave-two-thirds;
  66. }
  67.  
  68. @keyframes bar-wave-full {
  69. 0% {
  70. height: 80%;
  71. bottom: -60%;
  72. }
  73. 100% {
  74. height: 30%;
  75. bottom: -85%;
  76. }
  77. }
  78.  
  79. @keyframes bar-wave-one-third {
  80. 0% {
  81. height: 100%;
  82. bottom: -50%;
  83. }
  84. 100% {
  85. height: 80%;
  86. bottom: -60%;
  87. }
  88. }
  89.  
  90. @keyframes bar-wave-two-thirds {
  91. 0% {
  92. height: 90%;
  93. bottom: -55%;
  94. }
  95. 100% {
  96. height: 50%;
  97. bottom: -75%;
  98. }
  99. }
  100. </style>
  101. </body>
  102. </html>
Add Comment
Please, Sign In to add comment