25 CSS Hacks Every Developer Should Know

Full-screen background image

Problem: making a background image cover the entire screen.

Solution: use `background-size`.

.full-screen-bg {
  background-image: url('background.jpg');
  background-size: cover;
  background-position: center;
  height: 100vh;
}