Skip to content

Instantly share code, notes, and snippets.

@Rahix
Created August 1, 2015 14:08
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 Rahix/af1b38fb3da9937f753f to your computer and use it in GitHub Desktop.
Save Rahix/af1b38fb3da9937f753f to your computer and use it in GitHub Desktop.
The stylesheet for animated svg paths.
<style>
.hiddenPath {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
}
.animatedPath {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: dash 1s linear forwards;
}
#DP1 {
transform-origin: 102px 114px;
}
#DP2 {
transform-origin: 473px 145px;
}
#DP3 {
transform-origin: 345px 287px;
}
#DP4 {
transform-origin: 132px 322px;
}
@keyframes dash {
from {
stroke-dashoffset: 1000;
}
to {
stroke-dashoffset: 0;
}
}
.hiddenInfoBubble {
transform: scale(0);
}
.animatedInfoBubble {
transform: scale(1);
transition: transform 0.35s ease-in-out;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment