<!-- This is an in-class exercise due by the end of the week (Friday, March 22) -->
<div id="tile-container" class="cf"></div>
<div id="notification"> ๐ Your emoji has been copied!</div>
CSS
/* Use CSS to style the tiles. */
/* How big are they? What color? Do they move? Do they change when hovered over? Test to find the possibilities! */
#tile-container {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.tile {
background: white;
width: 10%;
height: 10%;
float: left;
border: 0.25px solid #dce0e8;
cursor: pointer;
font-size: 2em;
}
.tile:nth-child(odd) {
background: #efefef;
}
.tile:hover {
background-color: #dadfe8;
}
#notification {
display: none;
height: 40px;
width: 50%;
background-color: rgba(56, 64, 76, 0.8);
position: fixed;
bottom: 10px;
left: 25%;
color: white;
padding: 5px;
border-radius: 50px;
}
/* USE A MINIMUM OF TWO MEDIA QUERIES TO CREATE DIFFERENT TILE ARRANGEMENTS */
@media screen and (min-width: 600px) {
.tile {
font-size: 3em;
height: 15%;
width: 15%;
}
}
@media screen and (max-width: 300px) and (min-width: 0px) {
.tile {
font-size: 1em;
height: 8%;
width: 10%;
}
}
html {
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
body {
margin: 0;
font-family: sans-serif;
text-align: center;
}
/* Clear Float */
.cf::before,
.cf::after {
content: " ";
display: table;
}
.cf::after {
clear: both;
}
.cf {
*zoom: 1;
}
JavaScript
const emojis =...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features โ
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.