Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsan committed Sep 13, 2018
1 parent 2eb3fa8 commit 8ceba83
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions colors.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
<body></body>
<script src="colors.js"></script>
<script src="utilities.js"></script>
<script src="main.js"></script>
</html>
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

//----------------------------------
// YOUR CODE
//----------------------------------
15 changes: 15 additions & 0 deletions utilities.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var create = function(x,y,color){
// set div attributes
var div = document.createElement('div');
div.style.zIndex = '1';
div.style.position = 'absolute';
div.style.left = x + 'px';
div.style.top = y + 'px';
div.style.width = '15px';
div.style.height = '15px';
div.style.borderRadius = '50%';
div.style.background = color;

// Then append the whole thing onto the body
document.getElementsByTagName('body')[0].appendChild(div);
};

0 comments on commit 8ceba83

Please sign in to comment.