Skip to content

Instantly share code, notes, and snippets.

@1024jp
Created January 31, 2020 08:24
Show Gist options
  • Select an option

  • Save 1024jp/d065e9caa4baf53f699044f4ad9cf9b3 to your computer and use it in GitHub Desktop.

Select an option

Save 1024jp/d065e9caa4baf53f699044f4ad9cf9b3 to your computer and use it in GitHub Desktop.
Test SVG file to check set element behavior with class toggling.
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<style type="text/css"><![CDATA[
.toggled circle { opacity:0.5 }
]]></style>
<g>
<circle r="16" cx="32" cy="32"/>
<set attributeType="xml" attributeName="class" to="toggled" begin="1s" dur="2s"/>
<!-- <set attributeType="CSS" attributeName="opacity" to="0.5" begin="1s" dur="2s"/> -->
</g>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment