20 lines
532 B
HTML
20 lines
532 B
HTML
<!DOCTYPE html>
|
|
<base href="http://www.example.com/">
|
|
<svg>
|
|
<script>
|
|
var svgRoot = document.querySelector('svg');
|
|
svgRoot.pauseAnimations();
|
|
svgRoot.setCurrentTime(1);
|
|
</script>
|
|
<defs>
|
|
<path id="path" d="M100,0z"/>
|
|
</defs>
|
|
<rect width="100" height="100" fill="green">
|
|
<animateMotion dur="0.01" fill="freeze">
|
|
<mpath href="#path"/>
|
|
</animateMotion>
|
|
</rect>
|
|
<rect id="rect" width="100" height="100" fill="red"/>
|
|
<set attributeName="fill" href="#rect" to="green" dur="indefinite"/>
|
|
</svg>
|