Skip to content

Instantly share code, notes, and snippets.

@rpasta42
Created September 22, 2016 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rpasta42/f10c86be463cd669f0ec5882382877bd to your computer and use it in GitHub Desktop.
Save rpasta42/f10c86be463cd669f0ec5882382877bd to your computer and use it in GitHub Desktop.
<html><head>
<script src="https://code.jquery.com/jquery-2.2.4.js" integrity="sha256-iT6Q9iMJYuQiMWNd9lDyBUStIq/8PuOW33aOqmvFpqI=" crossorigin="anonymous"></script>
<style>
#back {
width: 100%;
height: 100%;
opacity: 0.7;
/*filter: blur(5px);*/
}
html, body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
}
#money {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
z-index: 100;
font-size: 2000%;
}
</style>
</head>
<body>
<img id="back" src="back.jpg">
<div id="money">$0</div>
<script>
$(function() {
var amount = 150000;
var timeDelay = 50; //100; //500;
function dec() {
if (amount < 0) {
$('#money').text('$0');
return;
}
$('#money').text('$' + amount );
amount = amount - 499; //500; //2500;
setTimeout(dec, timeDelay);
}
dec();
});
</script>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment