Skip to content

Commit 00dd92c

Browse files
adding animation-timing-function: frames() demo
1 parent 8874cfe commit 00dd92c

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>animation-timing-function frames example</title>
6+
<style>
7+
body {
8+
margin: 0;
9+
}
10+
div {
11+
position: relative;
12+
width: 100%;
13+
height: 200px;
14+
background: red;
15+
animation: grow;
16+
animation-duration: 5s;
17+
animation-iteration-count: infinite;
18+
}
19+
20+
p {
21+
position: absolute;
22+
width: 250px;
23+
top: 10px;
24+
left: 10px;
25+
color: white;
26+
}
27+
28+
.div1 {
29+
animation-timing-function: frames(10);
30+
}
31+
32+
.div2 {
33+
animation-timing-function: steps(10);
34+
}
35+
36+
.div3 {
37+
animation-timing-function: ease-in;
38+
}
39+
40+
@keyframes grow {
41+
from {
42+
width: 0%;
43+
background: red;
44+
}
45+
46+
to {
47+
width: 100%;
48+
background: blue;
49+
}
50+
}
51+
</style>
52+
</head>
53+
<body>
54+
<div class="div1"><p>animation-timing-function: frames(10)<p></div>
55+
<div class="div2"><p>animation-timing-function: steps(10);<p></div>
56+
<div class="div3"><p>animation-timing-function: ease-in;<p></div>
57+
</body>
58+
</html>

0 commit comments

Comments
 (0)