-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphoto.css
43 lines (38 loc) · 1.01 KB
/
photo.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
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #f0f0f0; /* added background color */
}
.img {
display: flex;
flex-wrap: wrap;
justify-content: center;
width: 100%;
height: 100vh;
padding: 20px; /* added padding */
background-color: #fff; /* added background color */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* added box shadow */
}
/* added hover animation to images */
.img img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 10px;
transition: transform 0.3s ease-in-out; /* added transition effect */
}
.img img:hover {
transform: scale(1.1); /* scale up on hover */
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); /* added box shadow on hover */
}
.img img:hover::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.5); /* added white overlay on hover */
border-radius: 10px;
}