Skip to content

Instantly share code, notes, and snippets.

Created August 9, 2016 20:16
Show Gist options
  • Save anonymous/a1dd4d8ddd6989ae0e06b844c6f4a71e to your computer and use it in GitHub Desktop.
Save anonymous/a1dd4d8ddd6989ae0e06b844c6f4a71e 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