-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassignment.html
More file actions
128 lines (110 loc) · 3.43 KB
/
Copy pathassignment.html
File metadata and controls
128 lines (110 loc) · 3.43 KB
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
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Photo Gallery</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Arial, sans-serif;
background: #f9f9f9;
color: #222;
}
h1 {
text-align: center;
margin: 20px 0;
font-size: 28px;
color: #333;
}
.gallery {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 15px;
padding: 20px;
max-width: 1000px;
margin: 0 auto;
}
.card {
border-radius: 10px;
overflow: hidden;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
background: #fff;
transition: transform 0.3s ease;
text-align: center;
}
.card img {
width: 100%;
height: 220px;
object-fit: cover;
display: block;
transition: transform 0.3s ease;
}
.card:hover img {
transform: scale(1.05);
}
.caption {
padding: 10px;
font-weight: bold;
color: #444;
}
/* Responsive */
@media (max-width: 991px) {
.gallery {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 767px) {
.gallery {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<h1>Photo Gallery</h1>
<section class="gallery">
<div class="card">
<img src="https://images.unsplash.com/photo-1502877338535-766e1452684a?auto=format&fit=crop&w=800&q=80" alt="Car" />
<div class="caption">Car</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1505678261036-a3fcc5e884ee?auto=format&fit=crop&w=800&q=80" alt="Cricketer" />
<div class="caption">Cricketer</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1508672019048-805c876b67e2?auto=format&fit=crop&w=800&q=80" alt="Animal" />
<div class="caption">Animal</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=800&q=80" alt="Nature" />
<div class="caption">Nature</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1504215680853-026ed2a45def?auto=format&fit=crop&w=800&q=80" alt="Bike" />
<div class="caption">Bike</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=800&q=80" alt="Food" />
<div class="caption">Food</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1501785888041-af3ef285b470?auto=format&fit=crop&w=800&q=80" alt="Mountain" />
<div class="caption">Mountain</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1467269204594-9661b134dd2b?auto=format&fit=crop&w=800&q=80" alt="City" />
<div class="caption">City</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1501004318641-b39e6451bec6?auto=format&fit=crop&w=800&q=80" alt="Flower" />
<div class="caption">Flower</div>
</div>
</section>
</body>
</html>