Skip to content

Commit 22762b7

Browse files
author
Divyanshi Vashist
committed
Added support for %
1 parent 2e7c654 commit 22762b7

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

examples/Nyancat.png

11.4 KB
Loading

examples/basicShapeCirclePath.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!-- <!DOCTYPE html>
2+
<script src="../third_party/web-animations-js/web-animations.dev.js"></script>
3+
<script src="../motion-path-polyfill.min.js"></script>
4+
5+
<div id="container">
6+
<div id="target">
7+
<img src="Nyancat.png" height="10%" width="10%">
8+
</div>
9+
</div>
10+
11+
<style>
12+
body {
13+
margin: 0px;
14+
}
15+
16+
#container {
17+
height: 100px;
18+
width: 100px;
19+
}
20+
#target {
21+
position: absolute;
22+
}
23+
24+
</style>
25+
26+
<script>
27+
var keyframes = [ {offsetPath: 'circle(100px at 500px 500px)', offsetDistance: '0%'},
28+
{offsetPath: 'circle(100px at 500px 500px)', offsetDistance: '100%'}];
29+
var timing = {duration: 20000, iterations: 3};
30+
target.animate(keyframes, timing);
31+
</script> -->

0 commit comments

Comments
 (0)