Skip to content

Instantly share code, notes, and snippets.

@aok-solutions
Forked from anonymous/index.html
Created August 9, 2016 20:17
Show Gist options
  • Save aok-solutions/be63b78af970d620597790cec2ce8e5d to your computer and use it in GitHub Desktop.
Save aok-solutions/be63b78af970d620597790cec2ce8e5d to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/qatigatira
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
html, body { height: 100%; width: 100%;}
body {
background-image: url('http://www.gunnars.com/wp-content/uploads/2014/08/Space.jpg');
background-repeat: repeat-x;
}
</style>
</head>
<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
<body>
<script id="jsbin-javascript">
$(function(){
var x = 0;
setInterval(function(){
x-=1;
$('body').css('background-position', x + 'px 0');
}, 10);
})
</script>
<script id="jsbin-source-css" type="text/css">html, body { height: 100%; width: 100%;}
body {
background-image: url('http://www.gunnars.com/wp-content/uploads/2014/08/Space.jpg');
background-repeat: repeat-x;
}</script>
<script id="jsbin-source-javascript" type="text/javascript"> $(function(){
var x = 0;
setInterval(function(){
x-=1;
$('body').css('background-position', x + 'px 0');
}, 10);
})</script></body>
</html>
html, body { height: 100%; width: 100%;}
body {
background-image: url('http://www.gunnars.com/wp-content/uploads/2014/08/Space.jpg');
background-repeat: repeat-x;
}
$(function(){
var x = 0;
setInterval(function(){
x-=1;
$('body').css('background-position', x + 'px 0');
}, 10);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment