-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrid_Card_ResponsiveGallery.html
116 lines (93 loc) · 3.29 KB
/
Grid_Card_ResponsiveGallery.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
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
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Card Gallery</title>
<style>
* {
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
body {
box-sizing: border-box;
}
.GalleryContainer {
margin: 5rem;
/* border: 3px solid black; */
box-shadow: 0 8px 16px 4px rgba(0, 0, 0, 0.1);
/* box-shadow: x-offset y-offset blur spread color */
}
.GalleryContainer h3{
text-align: center;
padding-top: 2rem;
}
.GalleryWrapper {
/* border: 2px solid red; */
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
grid-gap: 2rem;
/* justify-content: center; */
}
.Card {
/* border: 3px solid green; */
margin: 4rem;
box-shadow: 0 8px 16px 4px rgba(0, 0, 0, 0.1);
}
.Card img {
width: 100%;
height: auto;
object-fit: cover;
}
</style>
</head>
<body>
<section class="GalleryContainer">
<h3>This is a Image Gallery using CSS Grids and Cards</h3>
<div class="GalleryWrapper">
<div class="Card">
<img src="https://source.unsplash.com/collection/190727/1600x900" alt="Random Image">
<div class="CardDesc">
<h2>Lorem, ipsum.</h2>
<p>Lorem ipsum dolor sit amet.</p>
</div>
</div>
<div class="Card">
<img src="https://source.unsplash.com/collection/190727/1600x900" alt="Random Image">
<div class="CardDesc">
<h2>Lorem, ipsum.</h2>
<p>Lorem ipsum dolor sit amet.</p>
</div>
</div>
<div class="Card">
<img src="https://source.unsplash.com/collection/190727/1600x900" alt="Random Image">
<div class="CardDesc">
<h2>Lorem, ipsum.</h2>
<p>Lorem ipsum dolor sit amet.</p>
</div>
</div>
<div class="Card">
<img src="https://source.unsplash.com/collection/190727/1600x900" alt="Random Image">
<div class="CardDesc">
<h2>Lorem, ipsum.</h2>
<p>Lorem ipsum dolor sit amet.</p>
</div>
</div>
<div class="Card">
<img src="https://source.unsplash.com/collection/190727/1600x900" alt="Random Image">
<div class="CardDesc">
<h2>Lorem, ipsum.</h2>
<p>Lorem ipsum dolor sit amet.</p>
</div>
</div>
<div class="Card">
<img src="https://source.unsplash.com/collection/190727/1600x900" alt="Random Image">
<div class="CardDesc">
<h2>Lorem, ipsum.</h2>
<p>Lorem ipsum dolor sit amet.</p>
</div>
</div>
</div>
</section>
</body>
</html>