LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
CSS
.container {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 900px;
  margin: 0 auto;
  background-color: lavender;
  z-index: 5;
}

.box {
  width: 200px;
  height: 200px;
  margin-right: 10px;
  margin-bottom: 10px;
  background-color: lightgray;
  cursor: pointer;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: black;
  opacity: 0.5;
  z-index: 10;
}
.modal-overlay--show {
  display: block;
}

.popup {
  position: fixed;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  width: 500px;
  height: 100%;
  padding-top: 10px;
  margin: 0 auto;
  background-color: lightpink;
  z-index: 15;
}
.popup--show {
  display: flex;
}
JS
console.clear() 

var boxs = document.querySelectorAll('.box')
var modalOverlay = document.querySelector('.modal-overlay')
var popup = document.querySelector('.popup')

for (var i=0; i
Term
Sat, 04/14/2018 - 20:44

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv