Skip to content

Instantly share code, notes, and snippets.

@swashcap
Last active July 22, 2021 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swashcap/00a8ad956b65bcfaa48d26e875f92e17 to your computer and use it in GitHub Desktop.
Save swashcap/00a8ad956b65bcfaa48d26e875f92e17 to your computer and use it in GitHub Desktop.
A demo SVG for experimenting with the <object> element
Display the source blob
Display the rendered blob
Raw
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<style>
.item {
opacity: 0;
transition: opacity 200ms;
}
.step-1 .item-1 {
opacity: 1;
}
.step-2 .item-1,
.step-2 .item-2 {
opacity: 1
}
.step-3 .item-1,
.step-3 .item-2,
.step-3 .item-3 {
opacity: 1;
}
</style>
<g id="root">
<g class="item item-1">
<circle cx="30" cy="30" fill="forestgreen" r="25" />
</g>
<g class="item item-2">
<circle cx="50" cy="50" fill="lightseagreen" r="25" />
</g>
<g class="item item-3">
<circle cx="70" cy="70" fill="royalblue" r="25" />
</g>
</g>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment