-
Notifications
You must be signed in to change notification settings - Fork 34
/
hover_images.css
84 lines (77 loc) · 1.89 KB
/
hover_images.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
75
76
77
78
79
80
81
82
83
84
.hovereffect {
width: 100%;
height: 100%;
float: left;
overflow: hidden;
position: relative;
text-align: center;
cursor: default;
background: -webkit-linear-gradient(45deg, #ff89e9 0%, #05abe0 100%);
background: linear-gradient(45deg, #ff89e9 0%,#05abe0 100%);
}
.hovereffect .overlay {
width: 100%;
height: 100%;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
padding: 3em;
text-align: left;
}
.hovereffect img {
display: block;
position: relative;
max-width: none;
width: calc(100% + 60px);
-webkit-transition: opacity 0.35s, -webkit-transform 0.45s;
transition: opacity 0.35s, transform 0.45s;
-webkit-transform: translate3d(-40px,0,0);
transform: translate3d(-40px,0,0);
}
.hovereffect h2 {
text-transform: uppercase;
color: #fff;
position: relative;
font-size: 17px;
background-color: transparent;
padding: 15% 0 10px 0;
text-align: left;
}
.hovereffect .overlay:before {
position: absolute;
top: 20px;
right: 20px;
bottom: 20px;
left: 20px;
border: 1px solid #fff;
content: '';
opacity: 0;
filter: alpha(opacity=0);
-webkit-transition: opacity 0.35s, -webkit-transform 0.45s;
transition: opacity 0.35s, transform 0.45s;
-webkit-transform: translate3d(-20px,0,0);
transform: translate3d(-20px,0,0);
}
.hovereffect a, .hovereffect p {
color: #FFF;
opacity: 0;
filter: alpha(opacity=0);
-webkit-transition: opacity 0.35s, -webkit-transform 0.45s;
transition: opacity 0.35s, transform 0.45s;
-webkit-transform: translate3d(-10px,0,0);
transform: translate3d(-10px,0,0);
}
.hovereffect:hover img {
opacity: 0.6;
filter: alpha(opacity=60);
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
.hovereffect:hover .overlay:before,
.hovereffect:hover a, .hovereffect:hover p {
opacity: 1;
filter: alpha(opacity=100);
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}