[ create a new paste ] login | about

Link: http://codepad.org/ZXNcZuqc    [ raw code | fork ]

Plain Text, pasted on Oct 18:
<link href='http://fonts.googleapis.com/css?family=Lato:100' rel='stylesheet' type='text/css'>
<script>
function funcs(){
if (event.keyCode == 32){
document.getElementById("div2").style.top="40px";document.getElementById("div").style.top="40px";document.getElementById("rocks").style.marginBottom="-50px";

setTimeout('document.getElementById("div2").style.top="0px";document.getElementById("div").style.top="0px";document.getElementById("rocks").style.marginBottom="0px";', '500');
}

if (event.keyCode == 39){
document.getElementById("div2").style.right="-20px";document.getElementById("div").style.left="-80px";
}

if (event.keyCode == 37){ document.getElementById("div2").style.right="20px";document.getElementById("div").style.left="-120px";
}
if (event.keyCode == 38){ document.getElementById("div2").style.right="0px";document.getElementById("div").style.left="-100px";
}
}
</script>
<body onkeydown='funcs();'>

<div style="position:absolute;top:15px;left:15px;background-color:black;opacity:0.1;height:500px;width:850px;z-index:999;"></div>

<div style="position:absolute;top:10px;left:10px;width:850px;height:500px;-webkit-perspective:250;position:relative;overflow:hidden;">

<div style="position:absolute;top:25px;right:25px;font-family:Lato;color:white;font-weight:100;font-size:40px;">Income: $<span id="num">0</span> per sec</div>
 
<div style="-webkit-transform: rotateY(80deg);background-image:url(http://farm3.staticflickr.com/2733/4426534514_8acb9a6fdc.jpg);width:1000px;height:400px;position:absolute;top:0px;left:-100px;background-position:0;background-size:700px;z-index:-1;-webkit-transition:left 0.5s, right 0.5s, top 0.5s;" id="div"></div>


<div style="-webkit-transform: rotateX(90deg);background-image:url(http://farm3.staticflickr.com/2733/4426534514_8acb9a6fdc.jpg);width:700px;height:2500px;position:absolute;top:-800px;left:0px;background-position:0;background-size:900px;z-index:-2;-webkit-transition:left 0.5s, right 0.5s;" id="div3"></div>


<div style="-webkit-transform: rotateY(85deg);z-index:-1;background-image:url(http://farm3.staticflickr.com/2733/4426534514_8acb9a6fdc.jpg);width:700px;height:400px;position:absolute;top:0px;right:0px;background-position:0;background-size:700px;-webkit-transition:left 0.5s, right 0.5s, top 0.5s;" id="div2"></div>

<div style="position:absolute;bottom:30px;left:0px;width:100%;-webkit-transition:all 1s;" id="rocks"><center>
<div style="background-color:white;border-radius:100%;margin-left:50px;height:0px;width:0px;top:-170px;position:relative;-webkit-transition:all 1s;opacity:0.7;" id="rock"></div></center></div>


</div>

<script>
function afterafter(){
document.getElementById("rock").style.top="-170px"; 
}
function afterwink(){
var rand = Math.floor((Math.random()*100)+1);
document.getElementById("rock").style.top="1000px"; document.getElementById("rock").style.marginLeft=""+rand+"px"; document.getElementById("rock").style.height="0px"; document.getElementById("rock").style.width="0px";
if(document.getElementById("div").style.top === "40px"){
var num = Math.floor(document.getElementById("num").innerHTML);
document.getElementById("num").innerHTML = num+1;
}
else{
document.getElementById("num").innerHTML = num-1;
}
setTimeout('afterafter()', '1000');
}
function wink(){
document.getElementById("rock").style.top="0px";
document.getElementById("rock").style.height="40px";
document.getElementById("rock").style.width="40px";
setTimeout('afterwink()', '1500');
}
count = 0;
count2 = 400;
count3 = 400;
function func(){
count = count-5;
count2 = count2-5;
count3 = count3+5;
document.getElementById("div").style.backgroundPosition=count;
document.getElementById("div2").style.backgroundPosition=count2;
document.getElementById("div3").style.backgroundPosition="0 "+count3+"";
}
setInterval('func();', '10');
setInterval('wink();', '4000');
</script>
<span style="display:none;">
//take 3.6
//sorry last take!
//last


Create a new paste based on this one


Comments: