forked from wesbos/hot-tips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
object-fit.html
49 lines (41 loc) · 1.11 KB
/
object-fit.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="photos">
<img src="./nice-photos/vapormax.jpg">
<img src="./nice-photos/TNF-fanorak.png">
<img src="./nice-photos/ultra-boost.jpg">
<img src="./nice-photos/rimowa.png">
<img src="./nice-photos/patagonia black hole.jpg">
<img src="./nice-photos/nudie-belt.jpg">
<img src="./nice-photos/naked-and-famous-denim.jpg">
<img src="./nice-photos/kith-hoodie.jpg">
<img src="./nice-photos/hondo.jpg">
<img src="./nice-photos/coral-yeti.jpg">
<img src="./nice-photos/canada-goose.jpg">
<img src="./nice-photos/270-camo-sunset.jpg">
</div>
<style>
.photos img {
width: 100%;
height: 200px;
object-fit: cover;
}
.photos {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
background: #dfdfdf;
padding: 20px;
font-family: 'operator Mono';
border-radius: 20px;
}
h2 {
margin: 0 0 20px 0;
}
</style>
</body>
</html>