Advertisement
themesbyces

Goodies — Iron Man Bubble

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