-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
133 lines (117 loc) · 2.91 KB
/
index.html
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Hover on card to see magic.</title>
<script src='card.js'></script>
</head>
<style>
.app {
max-width: 76rem;
margin: 0 auto;
clear: both;
}
.card {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
border-radius: 4px;
transition: 0.15s ease-in-out;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.1), 0 5px 30px 5px rgba(0, 0, 0, 0.15), 0 10px 40px 10px rgba(0, 0, 0, 0.15);
}
.container {
margin: 1rem;
padding: 0;
position: relative;
width: 17rem;
height: 22rem;
float: left;
}
.highlight {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: linear-gradient( rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.05) 80%, rgba(0, 0, 0, 0.05));
}
.overlay {
position: absolute;
top: 5%;
left: 5%;
height: 90%;
width: 90%;
border: 3px solid red;
box-sizing: border-box;
box-shadow: 2px 3px 3px rgba(0, 0, 0, 0.15), 0 0 15px rgba(0, 0, 0, 0.3);
}
.overlay h2 {
position: absolute;
bottom: 0;
font-family: sans-serif;
color: white;
transform: translateX(0);
text-transform: uppercase;
font-size: 4rem;
line-height: 0;
text-align: center;
width: 100%;
}
h1 {
font-family: sans-serif;
letter-spacing: -0.025em;
text-align: center;
margin-top: 3rem;
font-size: 3rem;
margin-bottom: 0;
opacity: 0.8;
}
p {
font-family: sans-serif;
text-align: center;
opacity: 0.7;
margin-bottom: 3rem;
margin-top: 0.5rem;
}
</style>
<body>
<div class="app">
<h1>Hover card to see the interaction.</h1>
<p>Works only on desktop device.</p>
<div class="container">
<img src="https://s-media-cache-ak0.pinimg.com/736x/f5/a0/62/f5a0626a80fe6026c0ac65cdc2d8ede2.jpg" class="card" />
<div class="highlight"></div>
<div class="overlay">
<h2>Make</h2>
</div>
</div>
<div class="container">
<img src="https://s-media-cache-ak0.pinimg.com/736x/f5/a0/62/f5a0626a80fe6026c0ac65cdc2d8ede2.jpg" class="card" />
<div class="highlight"></div>
<div class="overlay">
<h2>Love</h2>
</div>
</div>
<div class="container">
<img src="https://s-media-cache-ak0.pinimg.com/736x/f5/a0/62/f5a0626a80fe6026c0ac65cdc2d8ede2.jpg" class="card" />
<div class="highlight"></div>
<div class="overlay">
<h2>Not</h2>
</div>
</div>
<div class="container">
<img src="https://s-media-cache-ak0.pinimg.com/736x/f5/a0/62/f5a0626a80fe6026c0ac65cdc2d8ede2.jpg" class="card" />
<div class="highlight"></div>
<div class="overlay">
<h2>War</h2>
</div>
</div>
</div>
<script>
subscribeCard('.container');
</script>
</body>
</html>