Advertisement
falkirks

#CISPABlackout PAGE DESIGN

Apr 21st, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. To contribute to the blackout I whipped up a little fade out. It isn't perfect cause I made it Ina hurry but feel free to use it and change to whatever suites you.
  2.  
  3. Please spread the word about the blackout. This is the future of the Internet in the balance.
  4.  
  5. Check an example of the below at http://src.kissr.com
  6.  
  7. ----START CODE FOR SITE----
  8.  
  9. <style>
  10.  
  11. img.bg {
  12. min-height: 100%;
  13. min-width: 1024px;
  14. width: 100%;
  15. height: auto;
  16. position: fixed;
  17. top: 0;
  18. left: 0;
  19. }
  20. div.contentBox {
  21. background:#fff;
  22. position:relative;
  23. top:75px;
  24. width:700px;
  25. height:500px;
  26. margin:auto;
  27. opacity:0.7;
  28. filter:alpha(opacity=70); /* For IE8 and earlier */
  29. }
  30. div.contentBoxheading {
  31. position:relative;
  32. float:left;
  33. margin-left:20px;
  34. height:40px;
  35. top:-30px;
  36. }
  37. h1 {
  38. font-family:"TradeGothic LT CondEighteen", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  39. font-weight:normal;
  40. font-size:2.4em;
  41. margin:0px;
  42. }
  43. p {
  44. position:absolute;
  45. font-family:"TradeGothic LT CondEighteen", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  46. font-weight:normal;
  47. font-size:1.2em;
  48. margin: 10px 10px 0px 10px;
  49. }
  50. </style>
  51.  
  52. <script type="text/javascript">//<![CDATA[
  53. function getElm(eID) {
  54. return document.getElementById(eID);
  55. }
  56. function show(eID) {
  57. getElm(eID).style.display='block';
  58. }
  59. function hide(eID) {
  60. getElm(eID).style.display='none';
  61. }
  62. function setOpacity(eID, opacityLevel) {
  63. var eStyle = getElm(eID).style;
  64. eStyle.opacity = opacityLevel / 100;
  65. eStyle.filter = 'alpha(opacity='+opacityLevel+')';
  66. }
  67. function fade(eID, startOpacity, stopOpacity, duration) {
  68. var speed = Math.round(duration / 100);
  69. var timer = 0;
  70. if (startOpacity < stopOpacity){
  71. for (var i=startOpacity; i<=stopOpacity; i++) {
  72. setTimeout("setOpacity('"+eID+"',"+i+")", timer * speed);
  73. timer++;
  74. } return;
  75. }
  76. for (var i=startOpacity; i>=stopOpacity; i--) {
  77. setTimeout("setOpacity('"+eID+"',"+i+")", timer * speed);
  78. timer++;
  79. }
  80. }
  81. function fadeIn(eID) {
  82. setOpacity(eID, 0); show(eID); var timer = 0;
  83. for (var i=1; i<=100; i++) {
  84. setTimeout("setOpacity('"+eID+"',"+i+")", timer * 5);
  85. timer++;
  86. }
  87. }
  88. function fadeOut(eID) {
  89. var timer = 0;
  90. for (var i=100; i>=1; i--) {
  91. setTimeout("setOpacity('"+eID+"',"+i+")", timer * 50);
  92. timer++;
  93. }
  94. setTimeout("hide('"+eID+"')", 5533310);
  95. }
  96. //]]></script>
  97.  
  98.  
  99. <body onload="fadeOut('fadingBox')">
  100. <div id="staticBox"><img src="https://dl.dropbox.com/s/cgp8oahkn488rnc/Photo%202013-04-21%203%2037%2036%20PM.png" class="bg" ></div>
  101. <div id="fadingBox"><img src="https://dl.dropbox.com/s/oq7nkhrtwb7cna5/Photo%202013-04-21%204%2001%2009%20PM.png" class="bg" ></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement