Created
July 25, 2017 22:01
-
-
Save LtAstros/5a695b024232498affce9176e4741859 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=5a695b024232498affce9176e4741859
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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