Advertisement
izuemis

cr angeidiarys #6 misc

Feb 11th, 2023
1,359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 4.48 KB | None | 0 0
  1. <style>
  2.  
  3. @font-face {
  4. font-family: ALBA;
  5. src: url(https://dl.dropbox.com/s/0l4qryezh7ac9ls/ALBA____.TTF);
  6. }
  7.  
  8. @font-face {
  9. font-family:funkhouse;
  10. src: url(https://dl.dropbox.com/s/2bxao21r582gf5d/FUNKHOUS.ttf);
  11. }
  12.  
  13. </style>
  14.  
  15. <script type="text/javascript">
  16. // <![CDATA[
  17. var colours=new Array("#90d2ff", "#90d2ff", "#68c2ff", "#68c2ff", "#d9efff"); // colours for top, right, bottom and left borders and background of bubbles
  18. var bubbles=80; // how many bubbles are moving at any given time
  19. var over_or_under="over"; // set to "over" for bubbles to always be on top, or "under" to allow them to float behind other objects
  20.  
  21. /****************************
  22. * JavaScript Bubble Bath *
  23. *(c)2010-13 mf2fm web-design*
  24. * http://www.mf2fm.com/rv *
  25. * DON'T EDIT BELOW THIS BOX *
  26. ****************************/
  27.  
  28. var swide=800;
  29. var shigh=600;
  30. var bubb=new Array();
  31. var bubbx=new Array();
  32. var bubby=new Array();
  33. var bubbs=new Array();
  34. var boddie;
  35. var ie_version=(navigator.appVersion.indexOf("MSIE")!=-1)?parseFloat(navigator.appVersion.split("MSIE")[1]):false;
  36.  
  37. function addLoadEvent(funky) {
  38. var oldonload=window.onload;
  39. if (typeof(oldonload)!='function') window.onload=funky;
  40. else window.onload=function() {
  41. if (oldonload) oldonload();
  42. funky();
  43. }
  44. }
  45.  
  46. addLoadEvent(bubba);
  47.  
  48. function bubba() { if (document.getElementById) {
  49. var i, rats, div;
  50. boddie=document.createElement("div");
  51. boddie.style.position="fixed";
  52. boddie.style.top="0px";
  53. boddie.style.left="0px";
  54. boddie.style.overflow="visible";
  55. boddie.style.width="1px";
  56. boddie.style.height="1px";
  57. boddie.style.backgroundColor="transparent";
  58. boddie.style.zIndex="0";
  59. document.body.appendChild(boddie);
  60. set_width();
  61. for (i=0; i<bubbles; i++) {
  62. rats=createDiv("3px", "3px");
  63.  
  64. div=createDiv("auto", "auto");
  65. rats.appendChild(div);
  66. div=div.style;
  67. div.top="1px";
  68. div.left="0px";
  69. div.bottom="1px";
  70. div.right="0px";
  71. div.borderLeft="1px solid "+colours[3];
  72. div.borderRight="1px solid "+colours[1];
  73.  
  74. div=createDiv("auto", "auto");
  75. rats.appendChild(div);
  76. div=div.style;
  77. div.top="0px";
  78. div.left="1px";
  79. div.right="1px";
  80. div.bottom="0px"
  81. div.borderTop="1px solid "+colours[0];
  82. div.borderBottom="1px solid "+colours[2];
  83.  
  84. div=createDiv("auto", "auto");
  85. rats.appendChild(div);
  86. div=div.style;
  87. div.left="1px";
  88. div.right="1px";
  89. div.bottom="1px";
  90. div.top="1px";
  91. div.backgroundColor=colours[4];
  92. if (ie_version && ie_version<10) div.filter="alpha(opacity=50)";
  93. else div.opacity=0.5;
  94.  
  95. boddie.appendChild(rats);
  96. bubb[i]=rats.style;
  97. bubb[i].zIndex=(over_or_under=="over")?"1001":"0";
  98. }
  99. bubble();
  100. }}
  101.  
  102. function bubble() {
  103. var c;
  104. for (c=0; c<bubbles; c++) if (!bubby[c] && Math.random()<0.333) {
  105. bubb[c].left=(bubbx[c]=Math.floor(swide/6+Math.random()*swide/1.5)-10)+"px";
  106. bubb[c].top=(bubby[c]=shigh)+"px";
  107. bubb[c].width="3px";
  108. bubb[c].height="3px"
  109. bubb[c].visibility="visible";
  110. bubbs[c]=3;
  111. break;
  112. }
  113. for (c=0; c<bubbles; c++) if (bubby[c]) update_bubb(c);
  114. setTimeout("bubble()", 40);
  115. }
  116.  
  117. function update_bubb(i) {
  118. if (bubby[i]) {
  119. bubby[i]-=bubbs[i]/2+i%2;
  120. bubbx[i]+=(i%5-2)/5;
  121. if (bubby[i]>0 && bubbx[i]>0 && bubbx[i]<swide) {
  122. if (Math.random()<bubbs[i]/shigh*2 && bubbs[i]++<8) {
  123. bubb[i].width=bubbs[i]+"px";
  124. bubb[i].height=bubbs[i]+"px";
  125. }
  126. bubb[i].top=bubby[i]+"px";
  127. bubb[i].left=bubbx[i]+"px";
  128. }
  129. else {
  130. bubb[i].visibility="hidden";
  131. bubby[i]=0;
  132. return;
  133. }
  134. }
  135. }
  136.  
  137. window.onresize=set_width;
  138. function set_width() {
  139. var sw_min=999999;
  140. var sh_min=999999;
  141. if (document.documentElement && document.documentElement.clientWidth) {
  142. if (document.documentElement.clientWidth>0) sw_min=document.documentElement.clientWidth;
  143. if (document.documentElement.clientHeight>0) sh_min=document.documentElement.clientHeight;
  144. }
  145. if (typeof(self.innerWidth)=='number' && self.innerWidth) {
  146. if (self.innerWidth>0 && self.innerWidth<sw_min) sw_min=self.innerWidth;
  147. if (self.innerHeight>0 && self.innerHeight<sh_min) sh_min=self.innerHeight;
  148. }
  149. if (document.body.clientWidth) {
  150. if (document.body.clientWidth>0 && document.body.clientWidth<sw_min) sw_min=document.body.clientWidth;
  151. if (document.body.clientHeight>0 && document.body.clientHeight<sh_min) sh_min=document.body.clientHeight;
  152. }
  153. if (sw_min==999999 || sh_min==999999) {
  154. sw_min=800;
  155. sh_min=600;
  156. }
  157. swide=sw_min;
  158. shigh=sh_min;
  159. }
  160.  
  161. function createDiv(height, width) {
  162. var div=document.createElement("div");
  163. div.style.position="absolute";
  164. div.style.height=height;
  165. div.style.width=width;
  166. div.style.overflow="hidden";
  167. div.style.backgroundColor="transparent";
  168. return (div);
  169. }
  170. // ]]>
  171. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement