-
Notifications
You must be signed in to change notification settings - Fork 0
/
gallery.css
74 lines (64 loc) · 1.23 KB
/
gallery.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
64
65
66
67
68
69
70
71
72
73
74
body {
margin: 0;
padding: 0;
background: #262626;
font-family: sans-serif;
}
.container {
width: 1280px;
margin: 70px auto 0;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.container .box {
position: relative;
width: 300px;
height: 300px;
background: salmon;
margin: 10px;
box-sizing: border-box;
display: inline-block;
}
.container .box .imgBox {
position: relative;
overflow: hidden;
}
.container .box .imgBox img {
max-width: 100%;
transition: transform 2s;
}
.container .box:hover .imgBox img {
transform: scale(1.2);
}
.container .box .details {
position: absolute;
top: 10px;
left: 10px;
bottom: 10px;
right: 10px;
background: rgba(0, 0, 0, .8);
transform: scaleY(0);
transition: transform .5s;
}
.container .box:hover .details {
transform: scaleY(1);
}
.container .box .details .content {
position: absolute;
top: 50%;
transform: translateY(-50%);
text-align: center;
padding: 15px;
color: #fff;
}
.container .box .details .content h2 {
margin: 0;
padding: 0;
font-size: 20px;
color: salmon;
}
.container .box .details .content p {
margin: 10px 0 0;
padding: 0;
}