-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
63 lines (56 loc) · 1.17 KB
/
styles.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
/* Reset default margin and padding */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Style for portfolio container */
.portfolio {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
margin: 20px;
}
/* Style for portfolio items */
.portfolio-item {
position: relative;
width: 200px; /* Adjust size as needed */
height: 200px; /* Adjust size as needed */
overflow: hidden;
margin: 10px;
border: 1px solid #ccc;
transition: all 0.3s ease;
}
/* Style for images inside portfolio items */
.portfolio-item img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}
/* Overlay style for hover effect */
.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
color: white;
opacity: 0;
display: flex;
justify-content: center;
align-items: center;
transition: opacity 0.3s ease;
}
/* Text inside overlay */
.overlay .text {
font-size: 20px;
}
/* Hover effect */
.portfolio-item:hover .overlay {
opacity: 1;
}
.portfolio-item:hover img {
transform: scale(1.1);
}