-
Notifications
You must be signed in to change notification settings - Fork 15
/
ys_animation4.html
89 lines (74 loc) · 1.93 KB
/
ys_animation4.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
<!DOCTYPE html>
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Dosis' rel='stylesheet' type='text/css'>
<style>
body {
background: #efefef;
margin: 4em;
font-family: Dosis, hevetica, arial, sans-serif;
font-weight: 400;
}
div {
margin-bottom: 4em;
}
.animation {
background: #f6ad2d;
color: white;
text-transform: uppercase;
font-size: 1.5em;
width: 150px;
height: 150px;
position: relative;
animation: bounceAround 1.1s ease-in-out infinite;
}
.transition {
background: #65a6a7;
color: #efefef;
width: 40%;
padding: 1em 0;
text-align: center;
font-size: 1.2em;
letter-spacing: .05em;
border-radius: 10px;
transition: .4s background ease-out;
}
.transition p {
margin: 0;
padding: 0;
pointer-events: none;
}
.transition:hover {
background: #e65445;
}
@keyframes bounceAround {
0% {
transform: translateY(0);
}
20% {
transform: translateY(-60px) rotate(0deg);
}
25% {
transform: translateY(20px) rotate(0deg);
}
35%,
55% {
transform: translateY(0px) rotate(0deg);
}
60% {
transform: translateY(-20px) rotate(0deg);
}
100% {
transform: translateY(-20px) rotate(360deg);
}
}
</style>
</head>
<body>
<h1>CSS Animation</h1>
<div class="animation"></div>
<div class="transition">
<p>Hover For Transition Action!</p>
</div>
</body>
</html>