Lego2012
2/7/2017 - 1:03 PM

Pop-Up Modal

Pop-Up Modal

#modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal {
  width: 70%;
  background: #fff;
  padding: 20px;
  text-align: center;
}

#modal-container:not(:target) {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s, visibility 1s;
}

#modal-container:target {
  opacity: 1;
  visibility: visible;
  transition: opacity 1s, visibility 1s;
}