Advertisement
agunq

like button ?

May 2nd, 2021
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. ## to do
  2. #make like button
  3.  
  4.  
  5. <style>
  6. #musicicon {
  7. position: fixed;
  8. bottom: 30px;
  9. left: 5px;
  10. width: 15px;
  11. height: 15px;
  12. -webkit-transition: all .7s ease;
  13. -moz-transition: all .7s ease;
  14. -o-transition: all .7s ease;
  15. transition: all .7s ease;
  16. }
  17.  
  18. .micon {
  19. z-index: 1;
  20. width: 15px;
  21. background: #000000;
  22. padding: 2px;
  23. width: 15px;
  24. height: 15px;
  25. border-radius: 4px;
  26. -webkit-transition: all .7s ease;
  27. -moz-transition: all .7s ease;
  28. -o-transition: all .7s ease;
  29. transition: all .7s ease;
  30. }
  31.  
  32. .micon:hover{
  33. border-top-left-radius: 4px;
  34. border-bottom-left-radius: 4px;
  35. border-top-right-radius: 0px;
  36. border-bottom-right-radius: 0px;
  37. }
  38.  
  39. .micon img { width: 15px; margin: 5px; }
  40.  
  41. .musicplayer {
  42. font-size: 12px;
  43. z-index: -1;
  44. position: absolute;
  45. margin-top: -19px;
  46. background: #ffffff;
  47. border: 1px solid #acacac;
  48. margin-left: 0px;
  49. border-radius: 4px;
  50. width: 0px;
  51. height: 15px;
  52. padding: 1px;
  53. overflow: hidden;
  54. -webkit-transition: all .7s ease;
  55. -moz-transition: all .7s ease;
  56. -o-transition: all .7s ease;
  57. transition: all .7s ease;
  58. }
  59.  
  60. .mplayer { margin-left: -23px; }
  61.  
  62. #musicicon:hover .musicplayer {
  63. margin-left: 19px;
  64. width: 150px;
  65. height: 15px;
  66. border-top-left-radius: 0px;
  67. border-bottom-left-radius: 0px;
  68. border-top-right-radius: 4px;
  69. border-bottom-right-radius: 4px;
  70. }
  71.  
  72. #musicicon:hover .micon {
  73. border-top-left-radius: 4px;
  74. border-bottom-left-radius: 4px;
  75. border-top-right-radius: 0px;
  76. border-bottom-right-radius: 0px;
  77. }
  78. </style>
  79.  
  80. <!--- MUSIC PLAYER CODE (CREDITS TO VANNE) - REPLACE .mp3 URL ---!>
  81. <div id="musicicon" onclick = "shoujo_like()">
  82.  
  83. <div class="micon">
  84. <img src="http://static.tumblr.com/n9vj50j/cxEn20wqg/12.gif">
  85. </div>
  86.  
  87. <div class="musicplayer">
  88. 23 likes
  89. </div>
  90.  
  91. </div>
  92.  
  93. <script>
  94. var shoujo_like = function() {
  95. document.getElementsByClassName("musicplayer")[0].innerHTML = "25 likes :D";
  96. };
  97. </script>
  98.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement