themesbyces

Goodies — Pumpkin Bubble

Oct 6th, 2020
1,502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.64 KB | None | 0 0
  1. <!-- Pumpkin Bubble by Franchesca (extasisthemes) -->
  2.  
  3. <!-- Place this before the CSS part of the code. -->
  4.  
  5. <!-- Show On Click Script -->
  6.  
  7. <script>
  8. function myFunction() {
  9. var x = document.getElementById("bubble-wrapper");
  10. if (x.style.display === "none") {
  11. x.style.display = "block";
  12. } else {
  13. x.style.display = "none";
  14. }
  15. }
  16. </script>
  17.  
  18. /** Paste this in the CSS part of the code. **/
  19.  
  20. #pumpkin-wrapper {
  21. bottom: 20px;
  22. height: 115px;
  23. position: fixed;
  24. right: 20px;
  25. width: 150px;
  26. z-index: 1;
  27. }
  28.  
  29. #pumpkin {
  30. height: 115px;
  31. position: absolute;
  32. width: 150px;
  33. -webkit-transition: all 0.5s ease;
  34. -moz-transition: all 0.5s ease;
  35. -o-transition: all 0.5s ease;
  36. }
  37.  
  38. #pumpkin:hover {
  39. opacity: 0.7;
  40. }
  41.  
  42. .pumpkin-stalk {
  43. background: #94a789;
  44. border-radius: 100px;
  45. height: 20px;
  46. margin-left: 70px;
  47. position: absolute;
  48. width: 10px;
  49. }
  50.  
  51. .pumpkin-curve-one {
  52. background: #f18d4f;
  53. border-radius: 100px;
  54. height: 100px;
  55. margin-top: 15px;
  56. position: absolute;
  57. width: 100px;
  58. }
  59.  
  60. .pumpkin-curve-two {
  61. background: #fe9554;
  62. border-radius: 100px;
  63. height: 100px;
  64. margin-left: 25px;
  65. margin-top: 15px;
  66. position: absolute;
  67. width: 100px;
  68. }
  69.  
  70. .pumpkin-curve-three {
  71. background: #f18d4f;
  72. border-radius: 100px;
  73. height: 100px;
  74. margin-left: 50px;
  75. margin-top: 15px;
  76. position: absolute;
  77. width: 100px;
  78. }
  79.  
  80. .pumpkin-nose {
  81. border-left: 10px solid transparent;
  82. border-right: 10px solid transparent;
  83. border-top: 15px solid #400c18;
  84. margin-left: 65px;
  85. margin-top: 45px;
  86. position: absolute;
  87. }
  88.  
  89. .pumpkin-mouth {
  90. border-left: 25px solid transparent;
  91. border-right: 25px solid transparent;
  92. border-top: 25px solid #400c18;
  93. height: 0px;
  94. margin-left: 15px;
  95. margin-top: 70px;
  96. position: absolute;
  97. width: 75px;
  98. }
  99.  
  100. .pumpkin-tooth-one {
  101. background: #f18d4f;
  102. height: 15px;
  103. margin-left: 45px;
  104. margin-top: 70px;
  105. position: absolute;
  106. width: 15px;
  107. z-index: 1;
  108. }
  109.  
  110. .pumpkin-tooth-two {
  111. background: #f18d4f;
  112. height: 15px;
  113. margin-left: 95px;
  114. margin-top: 80px;
  115. position: absolute;
  116. width: 15px;
  117. z-index: 1;
  118. }
  119.  
  120. .pumpkin-eye-left {
  121. border-bottom: 10px solid #400c18;
  122. border-left: 10px solid #400c18;
  123. border-right: 10px solid transparent;
  124. border-top: 10px solid transparent;
  125. margin-left: 35px;
  126. margin-top: 35px;
  127. position: absolute;
  128. }
  129.  
  130. .pumpkin-eye-right {
  131. border-bottom: 10px solid #400c18;
  132. border-left: 10px solid transparent;
  133. border-right: 10px solid #400c18;
  134. border-top: 10px solid transparent;
  135. margin-left: 95px;
  136. margin-top: 35px;
  137. position: absolute;
  138. }
  139.  
  140. #bubble-wrapper {
  141. display: none;
  142. }
  143.  
  144. .bubble {
  145. background: #ffffff;
  146. border: 1px solid #eeeeee;
  147. border-radius: 5px;
  148. bottom: 135px;
  149. color: #555555;
  150. font-size: 0.9rem;
  151. font-style: normal;
  152. height: 75px;
  153. hyphens: auto;
  154. letter-spacing: 1px;
  155. overflow-y: scroll;
  156. padding: 20px;
  157. position: absolute;
  158. z-index: 1;
  159. text-align: center;
  160. text-transform: uppercase;
  161. width: 108px;
  162. word-wrap: break-all;
  163. }
  164.  
  165. <!-- Paste this in the HTML part of the code. -->
  166.  
  167. <div id="pumpkin-wrapper">
  168.  
  169. <div id="pumpkin">
  170.  
  171. <a onclick="myFunction()" title="Trick Or Treat">
  172.  
  173. <div class="pumpkin-stalk"></div>
  174.  
  175. <div class="pumpkin-curve-one"></div>
  176.  
  177. <div class="pumpkin-curve-three"></div>
  178.  
  179. <div class="pumpkin-curve-two"></div>
  180.  
  181. <div class="pumpkin-eye-left"></div>
  182.  
  183. <div class="pumpkin-eye-right"></div>
  184.  
  185. <div class="pumpkin-nose"></div>
  186.  
  187. <div class="pumpkin-mouth"></div>
  188.  
  189. <div class="pumpkin-tooth-one"></div>
  190.  
  191. <div class="pumpkin-tooth-two"></div>
  192.  
  193. </a>
  194.  
  195. </div>
  196.  
  197. <div id="bubble-wrapper">
  198.  
  199. <div class="bubble">
  200. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
  201. </div>
  202.  
  203. </div>
  204.  
  205. </div>
Advertisement
Add Comment
Please, Sign In to add comment