lockets

text pop-up

Apr 8th, 2023
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <style>
  6. /* Popup container - can be anything you want */
  7. .popup {
  8. position: relative;
  9. display: inline-block;
  10. cursor: pointer;
  11. -webkit-user-select: none;
  12. -moz-user-select: none;
  13. -ms-user-select: none;
  14. user-select: none;
  15. font-family: romantic;
  16. font-size: 1em;
  17. color: white;
  18. font-weight: bold;
  19. padding-left: 15px;
  20. padding-right: 15x;
  21. text-shadow: -1px 0 #549ced, 0 1px #549ced, 1px 0 #549ced, 0 -1px #549ced, 0 0;
  22. letter-spacing: 2.5px;
  23. }
  24.  
  25. /* The actual popup */
  26. .popup .popuptext {
  27. visibility: hidden;
  28. width: 160px;
  29. background-color: #44BFF6BF;
  30. color: #fff;
  31. text-align: center;
  32. border-radius: 6px;
  33. padding: 8px 0;
  34. position: absolute;
  35. z-index: 1;
  36. bottom: 125%;
  37. left: 50%;
  38. margin-left: -80px;
  39. font-family: romantic;
  40. font-size: 0.85em;
  41. color: white;
  42. font-weight: bold;
  43. padding: 15px;
  44. text-shadow: -1px 0 #549ced, 0 1px #549ced, 1px 0 #549ced, 0 -1px #549ced, 0 0;
  45. letter-spacing: 2.5px;
  46. box-shadow: 4px 5px 10px #fff inset;
  47. }
  48.  
  49. /* Popup arrow */
  50. .popup .popuptext::after {
  51. content: "";
  52. position: absolute;
  53. top: 100%;
  54. left: 50%;
  55. margin-left: -5px;
  56. border-width: 5px;
  57. border-style: solid;
  58. border-color: #44BFF6BF transparent transparent transparent;
  59. }
  60.  
  61. /* Toggle this class - hide and show the popup */
  62. .popup .show {
  63. visibility: visible;
  64. -webkit-animation: fadeIn 1s;
  65. animation: fadeIn 1s;
  66. }
  67.  
  68. /* Add animation (fade in the popup) */
  69. @-webkit-keyframes fadeIn {
  70. from {opacity: 0;}
  71. to {opacity: 1;}
  72. }
  73.  
  74. @keyframes fadeIn {
  75. from {opacity: 0;}
  76. to {opacity:1 ;}
  77. }
  78. </style>
  79. </head>
  80. <body style="text-align:center">
  81.  
  82. <div class="popup" onclick="myFunction()">click me ♡
  83. <span class="popuptext" id="myPopup">tip: click i ii & iii for my info, scroll through the boxes for more info & click the play button for music</span>
  84. </div>
  85.  
  86. <script>
  87. // When the user clicks on div, open the popup
  88. function myFunction() {
  89. var popup = document.getElementById("myPopup");
  90. popup.classList.toggle("show");
  91. }
  92. </script>
  93.  
  94. </body>
  95. </html>
Advertisement
Add Comment
Please, Sign In to add comment