-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
78 lines (64 loc) · 1.42 KB
/
styles.css
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300&display=swap');
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background: #333;
color: #fff;
font-family: "Robotot", sans-serif;
}
h2 {
font-size: 45px;
font-weight: 300;
margin: 10px;
}
h2 span {
font-size: 30px;
}
p {
font-size: 20px;
}
.container {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 10px;
}
/* target the div children inside container class */
.container > div {
cursor: pointer;
height: 210px;
background-size: cover;
background-attachment: fixed;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
transition: all 0.5s ease-in;
}
.container > div:hover {
opacity: 0.7;
transform: scale(0.98);
}
/* target the first div child inside the container class */
.container > div:nth-of-type(1){
grid-column: 1 / 3;
}
.container > div:nth-of-type(6){
grid-column: 3 / 5;
}
.container > div:nth-of-type(9){
grid-column: 3 / 5;
}
.container > div:nth-of-type(10){
grid-column: 1 / 3;
}
.bg1 {
background: url("https://images.unsplash.com/photo-1448375240586-882707db888b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3300&q=80");
}
.bg2 {
background: url("https://images.unsplash.com/photo-1471644806490-77c53366b18b?ixlib=rb-1.2.1&auto=format&fit=crop&w=2104&q=80");
color: #333;
}