Skip to content

Instantly share code, notes, and snippets.

@pbojinov
Forked from anonymous/index.html
Last active April 8, 2018 02:32
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save pbojinov/c38c5d01bb124ffbbdc8 to your computer and use it in GitHub Desktop.
Save pbojinov/c38c5d01bb124ffbbdc8 to your computer and use it in GitHub Desktop.
JS Bincheck mark success animation// source https://jsbin.com/sovase
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="check mark success animation">
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
/* animations */
@-webkit-keyframes checkmark {
0% {
stroke-dashoffset: 50px
}
100% {
stroke-dashoffset: 0
}
}
@-ms-keyframes checkmark {
0% {
stroke-dashoffset: 50px
}
100% {
stroke-dashoffset: 0
}
}
@keyframes checkmark {
0% {
stroke-dashoffset: 50px
}
100% {
stroke-dashoffset: 0
}
}
@-webkit-keyframes checkmark-circle {
0% {
stroke-dashoffset: 240px
}
100% {
stroke-dashoffset: 480px
}
}
@-ms-keyframes checkmark-circle {
0% {
stroke-dashoffset: 240px
}
100% {
stroke-dashoffset: 480px
}
}
@keyframes checkmark-circle {
0% {
stroke-dashoffset: 240px
}
100% {
stroke-dashoffset: 480px
}
}
/* other styles */
/* .svg svg {
display: none
}
*/
.inlinesvg .svg svg {
display: inline
}
/* .svg img {
display: none
} */
.icon--order-success svg path {
-webkit-animation: checkmark 0.25s ease-in-out 0.7s backwards;
animation: checkmark 0.25s ease-in-out 0.7s backwards
}
.icon--order-success svg circle {
-webkit-animation: checkmark-circle 0.6s ease-in-out backwards;
animation: checkmark-circle 0.6s ease-in-out backwards
}
</style>
</head>
<body>
<div class="icon icon--order-success svg">
<svg xmlns="http://www.w3.org/2000/svg" width="72px" height="72px">
<g fill="none" stroke="#8EC343" stroke-width="2">
<circle cx="36" cy="36" r="35" style="stroke-dasharray:240px, 240px; stroke-dashoffset: 480px;"></circle>
<path d="M17.417,37.778l9.93,9.909l25.444-25.393" style="stroke-dasharray:50px, 50px; stroke-dashoffset: 0px;"></path>
</g>
</svg>
</div>
<script id="jsbin-source-css" type="text/css">/* animations */
@-webkit-keyframes checkmark {
0% {
stroke-dashoffset: 50px
}
100% {
stroke-dashoffset: 0
}
}
@-ms-keyframes checkmark {
0% {
stroke-dashoffset: 50px
}
100% {
stroke-dashoffset: 0
}
}
@keyframes checkmark {
0% {
stroke-dashoffset: 50px
}
100% {
stroke-dashoffset: 0
}
}
@-webkit-keyframes checkmark-circle {
0% {
stroke-dashoffset: 240px
}
100% {
stroke-dashoffset: 480px
}
}
@-ms-keyframes checkmark-circle {
0% {
stroke-dashoffset: 240px
}
100% {
stroke-dashoffset: 480px
}
}
@keyframes checkmark-circle {
0% {
stroke-dashoffset: 240px
}
100% {
stroke-dashoffset: 480px
}
}
/* other styles */
/* .svg svg {
display: none
}
*/
.inlinesvg .svg svg {
display: inline
}
/* .svg img {
display: none
} */
.icon--order-success svg path {
-webkit-animation: checkmark 0.25s ease-in-out 0.7s backwards;
animation: checkmark 0.25s ease-in-out 0.7s backwards
}
.icon--order-success svg circle {
-webkit-animation: checkmark-circle 0.6s ease-in-out backwards;
animation: checkmark-circle 0.6s ease-in-out backwards
}
</script>
</body>
</html>
/* animations */
@-webkit-keyframes checkmark {
0% {
stroke-dashoffset: 50px
}
100% {
stroke-dashoffset: 0
}
}
@-ms-keyframes checkmark {
0% {
stroke-dashoffset: 50px
}
100% {
stroke-dashoffset: 0
}
}
@keyframes checkmark {
0% {
stroke-dashoffset: 50px
}
100% {
stroke-dashoffset: 0
}
}
@-webkit-keyframes checkmark-circle {
0% {
stroke-dashoffset: 240px
}
100% {
stroke-dashoffset: 480px
}
}
@-ms-keyframes checkmark-circle {
0% {
stroke-dashoffset: 240px
}
100% {
stroke-dashoffset: 480px
}
}
@keyframes checkmark-circle {
0% {
stroke-dashoffset: 240px
}
100% {
stroke-dashoffset: 480px
}
}
/* other styles */
/* .svg svg {
display: none
}
*/
.inlinesvg .svg svg {
display: inline
}
/* .svg img {
display: none
} */
.icon--order-success svg path {
-webkit-animation: checkmark 0.25s ease-in-out 0.7s backwards;
animation: checkmark 0.25s ease-in-out 0.7s backwards
}
.icon--order-success svg circle {
-webkit-animation: checkmark-circle 0.6s ease-in-out backwards;
animation: checkmark-circle 0.6s ease-in-out backwards
}

Copyright 2016

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment