Advertisement
elroseria

spinning cd w/ cover

Mar 9th, 2024
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.78 KB | None | 0 0
  1. <!-- music player made by arsha~! cr appreciated @girisgoblog pls dont repost on other pastebins -->
  2.  
  3. <style>
  4.  
  5. lol {
  6. }
  7.  
  8. lol, .img2 { /* album's cover image u can change the size! */
  9. position: relative;
  10. left: -0.75em;
  11. width: 60px;
  12. height: 60px;
  13. background-color: black;
  14. color: black;
  15. z-index: 999;
  16. }
  17.  
  18. .img1 { /* cd image u can change the size too */
  19. position: absolute;
  20. left: 20px;
  21. top: 0.375em;
  22. width: 64px;
  23. height: 64px;
  24. z-index: 800;
  25. -webkit-animation: spin 2s linear infinite;
  26. -webkit-animation:spin 4s linear infinite;
  27. -moz-animation:spin 4s linear infinite;
  28. animation:spin 4s linear infinite;
  29. }
  30.  
  31. @-moz-keyframes spin {
  32. 100% { -moz-transform: rotate(360deg); }
  33. }
  34.  
  35. @-webkit-keyframes spin {
  36. 100% { -webkit-transform: rotate(360deg); }
  37. }
  38.  
  39. @keyframes spin {
  40. 100% {
  41. -webkit-transform: rotate(360deg);
  42. transform:rotate(360deg);
  43. }
  44. }
  45.  
  46. .img1:hover { /* this makes the cd stop spinning when hovering! */
  47. -webkit-animation: pop 0.3s ease;
  48. }
  49.  
  50. @media only screen and (max-width: 600px) {
  51.  
  52. .img1 {
  53. left: 25px;
  54. bottom: 1em;
  55. width: 47px;
  56. height: 47px;
  57. }
  58.  
  59. .img2 {
  60. width: 48px;
  61. height: 48px;
  62. }
  63.  
  64. }
  65.  
  66. </style>
  67.  
  68. <body>
  69. <div id="lol"><img class="img2"src="https://dl.dropbox.com/scl/fi/e362qggf9gs1n7v6tayh5/b0d28ef9dda70f7f5df46585b0ffffae.jpg?rlkey=hlp5nxuugmbok7mqdfbmmaapl&dl=0"><img class="img1" src="https://dl.dropbox.com/scl/fi/i1l2chqc8jalulqxdtl86/cd.png?rlkey=z152mgvkwxen4ag0p697cgnn9&dl=0" width="auto" height="45px"></div>
  70.  
  71. <script>
  72. document.getElementById("lol").onclick = function() {
  73. var audio = document.getElementById("audio");
  74. if (audio.paused) audio.play();
  75. else audio.pause();
  76. };
  77. </script>
  78.  
  79. <audio id="audio" src="https://dl.dropbox.com/scl/fi/mijw8gv6did7z4thgxrss/Perfect-Night.mp3?rlkey=i53y17j6427aytjmkxoh3cose&dl=0"></audio>
  80.  
  81. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement