1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
6 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
7 <title>Keyframes test
</title>
8 <style type=
"text/css" media=
"screen">
15 background-color: blue;
16 animation-duration:
1s;
17 animation-timing-function: linear;
19 animation-fill-mode: forwards;
22 <script src=
"resources/animation-test-helpers.js" type=
"text/javascript" charset=
"utf-8"></script>
23 <script type=
"text/javascript" charset=
"utf-8">
25 const expectedValues = [
26 // [time, element-id, property, expected-value, tolerance]
27 [
1,
"box",
"left",
300,
1],
29 var lastSheet = document.styleSheets[document.styleSheets.length -
1];
30 lastSheet.insertRule(
"@keyframes anim { from { left: 200px; } to { left: 300px;} }", lastSheet.cssRules.length);
31 runAnimationTest(expectedValues);
32 result += lastSheet.cssRules[lastSheet.cssRules.length -
1].cssText;
38 This test creates dynamically a prefixed @keyframes and verify the output.