Advertisement
aohitsugi

Untitled

Jul 23rd, 2023
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. <head>
  2. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
  3. </head>
  4.  
  5. <style>
  6. img:hover {
  7. filter: saturate(100%);
  8. }
  9.  
  10. #musicplayer{
  11. display:grid;
  12. grid-template-columns:30px auto;
  13. align-items:center;
  14. width: 100%;
  15. color: #000;
  16. font-size:18px;
  17. line-height:100%;
  18. background: #fff;
  19. border: 2px solid black;
  20. border-radius: 5px;
  21. z-index: 5;
  22.  
  23. }
  24.  
  25. #musictitle{
  26. font-weight: normal;
  27. font-family:times;
  28. overflow: hidden;
  29. white-space: nowrap;
  30. display:inline-block;
  31. width: calc(100% - 10px - 1px);
  32. margin-left: 2px;
  33. height: 17px;
  34. }
  35.  
  36. #musicpixel{
  37. width:105%;
  38. padding:5px;
  39. position:relative;
  40. min-height: 20px;
  41. min-width: 20px;
  42. }
  43.  
  44. .overlay {
  45. opacity:0;
  46. position:absolute;
  47. top:0;
  48. left:0;
  49. text-align:center;
  50. width:100%;
  51. height:100%;
  52. transition:0.3s ease;
  53. }
  54.  
  55. #musicplayer:hover .overlay {
  56. transition:0.3s ease;
  57. }
  58.  
  59. .playpause{
  60. position: absolute;
  61. top: 50%;
  62. left: 50%;
  63. transform: translate(-40%, -50%);
  64. }
  65.  
  66. .playpause:hover{
  67. cursor:help;
  68. }
  69.  
  70. #musicpixel img{
  71. display:block;
  72. }
  73.  
  74. .marquee{
  75. display: inline-block;
  76. padding-left: 100%;
  77. padding-right: 100%;
  78. animation: marquee 8s linear infinite;
  79. }
  80.  
  81. @keyframes marquee{
  82. 0% {
  83. transform: translate(0, 0);
  84. }
  85. 100% {
  86. transform: translate(-100%, 0);
  87. }
  88. }
  89.  
  90. </style>
  91.  
  92. <div id='musicplayer'>
  93. <div id='musicpixel'>
  94. <img src='https://i.imgur.com/398Yet2.gif'>
  95.  
  96. <div class='overlay'>
  97. <div class='playpause'><i class="fas fa-play"></i></div>
  98. </div>
  99. </div>
  100. <div id='musictitle'>
  101. <span class='marquee'> SHITODO SEITEN DAIMEIWAKU - KENSHI YONEZU </span>
  102. </div>
  103. </div>
  104.  
  105. <audio id='musicsrc' loop src='https://cdn.discordapp.com/attachments/1071491398362214602/1130032871797686342/Sufjan_Stevens_-_Shitodo_Seiten_Daimeiwaku.mp3'></audio>
  106.  
  107. <script>
  108. document.querySelector('.playpause').addEventListener('click', playpause);
  109.  
  110. function playpause(){
  111. if(document.querySelector('.playpause').innerHTML == '<i class="fas fa-play"></i>'){
  112. document.querySelector('#musicsrc').play();
  113. document.querySelector('.playpause').innerHTML = '<i class="fas fa-pause"></i>';
  114. } else{
  115. document.querySelector('#musicsrc').pause();
  116. document.querySelector('.playpause').innerHTML = '<i class="fas fa-play"></i>';
  117. }
  118.  
  119. }
  120. </script>
  121.  
  122. <link rel="stylesheet" href="//code.jquery.com/ui/1.13.0/themes/base/j4r nbesheet" href="/resources/demos/style.css">
  123. <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
  124. <script src="https://code.jquery.com/ui/1.13.0/jquery-ui.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement