-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
118 lines (118 loc) · 2.35 KB
/
style.css
File metadata and controls
118 lines (118 loc) · 2.35 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
/* Reset */
@import url(//codepen.io/chrisdothtml/pen/ojLzJK.css);
.tiles {
width: 1040px;
font-size: 0;
text-align: center;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.tiles .tile {
display: inline-block;
margin: 10px;
text-align: left;
opacity: 0.99;
overflow: hidden;
position: relative;
border-radius: 3px;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.05);
}
.tiles .tile:before {
content: "";
background: -webkit-gradient(
linear,
left top,
left bottom,
from(rgba(0, 0, 0, 0)),
to(rgba(0, 0, 0, 0.7))
);
background: linear-gradient(
to bottom,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0.7) 100%
);
width: 100%;
height: 50%;
opacity: 0;
position: absolute;
top: 100%;
left: 0;
z-index: 2;
-webkit-transition-property: top, opacity;
transition-property: top, opacity;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.tiles .tile img {
display: block;
max-width: 100%;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.tiles .tile .details {
font-size: 16px;
padding: 20px;
color: #fff;
position: absolute;
bottom: 0;
left: 0;
z-index: 3;
}
.tiles .tile .details span {
display: block;
opacity: 0;
position: relative;
top: 100px;
-webkit-transition-property: top, opacity;
transition-property: top, opacity;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-delay: 0s;
transition-delay: 0s;
}
.tiles .tile .details .title {
line-height: 1;
font-weight: 600;
font-size: 18px;
}
.tiles .tile .details .info {
line-height: 1.2;
margin-top: 5px;
font-size: 12px;
}
.tiles .tile:focus:before,
.tiles .tile:focus span,
.tiles .tile:hover:before,
.tiles .tile:hover span {
opacity: 1;
}
.tiles .tile:focus:before,
.tiles .tile:hover:before {
top: 50%;
}
.tiles .tile:focus span,
.tiles .tile:hover span {
top: -200%; /*to change hover position on card*/
}
.tiles .tile:focus .title,
.tiles .tile:hover .title {
-webkit-transition-delay: 0.15s;
transition-delay: 0.15s;
}
.tiles .tile:focus .info,
.tiles .tile:hover .info {
-webkit-transition-delay: 0.25s;
transition-delay: 0.25s;
}
/* @media only screen and (max-width: 600px) {
.tiles {
width: 300px;
}
} */
.tile img {
width: 205px;
height: 350px;
}