Create a mosaic with different colors by adding ID attributes and selecting individual elements. Use the background-color attribute.
Last active
October 24, 2017 05:42
-
-
Save dshen6/d9cdd70e652a6831d67ff35d89480e89 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=d9cdd70e652a6831d67ff35d89480e89
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>Mosaic</title> | |
</head> | |
<body> | |
<p>Create a mosaic with different colors by adding ID attributes and selecting individual elements. </p> | |
<div>red</div> | |
<div>orange</div> | |
<div>yellow</div> | |
<div>green</div> | |
<div>blue</div> | |
<div>#4286f4</div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></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
div { | |
width:100px; | |
height:100px; | |
border: 1px solid black; | |
float:left; | |
padding: 1px; | |
text-align:center; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment