-
Notifications
You must be signed in to change notification settings - Fork 65
/
16-made-with-love.html
79 lines (70 loc) · 1.58 KB
/
16-made-with-love.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
<!DOCTYPE html>
<html>
<head>
<title>16 Made With Love</title>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,700,900' rel='stylesheet' type='text/css'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/2.0.2/anime.min.js"></script>
<script>var ml = { timelines: {}};</script>
<style>
body {
font: 13px "Source Sans Pro", Arial, Helvetica, sans-serif;
background-color: #f3e9c6;
color: #fff;
text-align: center;
}
.moving-letters {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
margin: auto;
height: 200px;
}
</style>
</head>
<body>
<div class="moving-letters">
<h1 class="ml16">Made with love</h1>
<!--more-->
<script>
// Wrap every letter in a span
$('.ml16').each(function(){
$(this).html($(this).text().replace(/([^\x00-\x80]|\w)/g, "<span class='letter'>$&</span>"));
});
ml.timelines["ml16"] = anime.timeline({loop: true})
.add({
targets: '.ml16 .letter',
translateY: [-100,0],
easing: "easeOutExpo",
duration: 1400,
delay: function(el, i) {
return 30 * i;
}
}).add({
targets: '.ml16',
opacity: 0,
duration: 1000,
easing: "easeOutExpo",
delay: 1000
});
</script>
<style>
.ml16 {
color: #402d2d;
padding: 40px 0;
font-weight: 800;
font-size: 2em;
text-transform: uppercase;
letter-spacing: 0.5em;
overflow: hidden;
}
.ml16 .letter {
display: inline-block;
line-height: 1em;
}
</style>
</div>
</body>
</html>