Responsive Tile Exercise Template

by Josh Krauth-Harding

HTML

<!-- 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 =...