Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/animations/svg-style-animate-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Starting a CSS Animation and Web Animation at the same time on SVG style elements</title>
<style>
@keyframes anim {
from { color: green; }
to { color: red; }
}
#target {
animation: anim 1s linear;
}
</style>
<svg>
<style id=target>Test</style>
</svg>
<script>
addEventListener('load', () => {
target.animate({'top': ['0px', '10px']}, 1000);
target.offsetTop;
});
</script>