themesbyces

Goodies — Ghost Bubble

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