Created
July 25, 2017 22:03
-
-
Save LtAstros/86ef55fdfeaf6352dde883f23c0d3709 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=86ef55fdfeaf6352dde883f23c0d3709
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Page Title</title> | |
</head> | |
<body> | |
<div id="blop1" class="blops"></div> | |
<div id="blop2" class="blops"></div> | |
<div id="blop3" class="blops"></div> | |
<div id="blop4" class="blops"></div> | |
<div id="blop5" class="blops"></div> | |
<div id="blop6" class="blops"></div> | |
<div id="blop7" class="blops"></div> | |
<div id="blop8" class="blops"></div> | |
<div id="blop9" class="blops"></div> | |
<div id="blop10" class="blops"></div> | |
<div id="character"></div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"enabledLibraries":["jquery"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var random = (Math.floor((Math.random() * 100) + 1)) + "%"; | |
var dd = 1; | |
setInterval(function(){ | |
for(var count = 1; count < 11; count = count + 1){ | |
$("#blop"+count).css("top", $("#blop"+count).offset().top + 1); | |
} | |
},1); | |
for(var count = 1; count < 11; count = count + 1){ | |
$("#blop"+count).css("top", -125 * count); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.blops { | |
width: 20px; | |
height: 20px; | |
background-color: salmon; | |
position: absolute; | |
} | |
#character { | |
width: 50px; | |
height: 50px; | |
background-color: yellow; | |
position: absolute; | |
top: 85%; | |
left: 50%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment