-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
106 lines (88 loc) · 1.53 KB
/
style.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
display: grid;
place-items: center;
padding: 5em 5em;
}
.grid-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(100px, 0.5fr));
grid-template-rows: repeat(2, 300px);
grid-auto-flow: dense;
gap: 0.5em;
width: 100%;
}
.grid-container img {
width: 100%;
height: 100%;
object-fit: cover;
cursor: pointer;
transition: transform 0.6s ease-in-out;
}
.grid-container div {
border-radius: 5px;
overflow: hidden;
}
.grid-item1 {
grid-row: span 2;
}
.grid-item3 {
grid-column: 2 / 4;
grid-row: 2 / 3;
}
.grid-item4 {
grid-row: 1 / 3;
grid-column: 4 / 5;
}
.grid-container img:hover {
transform: scale(1.1);
}
@media (width <= 990px) {
body {
padding: 2em 2em;
}
.grid-container {
grid-template-columns: repeat(4, minmax(100px, 1fr));
grid-template-rows: repeat(4, 200px);
padding-bottom: 2em;
}
.grid-item1 {
grid-column: 1 / 3;
grid-row: 1 / 3;
}
.grid-item2 {
grid-column: 3 / 6;
grid-row: 1 / 3;
}
.grid-item3 {
grid-column: 3 / 6;
grid-row: 3 / 4;
}
.grid-item4 {
grid-row: 3 / 5;
grid-column: 1 / 3;
}
.grid-item5 {
grid-column: 3 / 6;
grid-row: 4 / 5;
}
}
@media (width <= 400px) {
body {
padding: 1em 1em;
}
.grid-container {
grid-template-columns: 1fr;
grid-template-rows: repeat(auto-fit, 200px);
padding-bottom: 2em;
}
.grid-container > * {
grid-column: unset;
grid-row: unset;
}
}