Created
December 29, 2021 20:56
-
-
Save jmakeig/9148dd20316468a0522fdc5b1b5bdfab to your computer and use it in GitHub Desktop.
Timer CSS animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svg { | |
display: inline-block; | |
height: 90px; | |
width: 90px; | |
} | |
svg.timer { | |
transform: rotate(-90deg); | |
overflow: visible; | |
} | |
circle.gague { | |
animation: delay-progress 5000ms both linear; | |
} | |
@keyframes delay-progress { | |
from { | |
stroke-dashoffset: 0; | |
} | |
to { | |
stroke-dashoffset: 1; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<svg class="timer"> | |
<circle | |
class="gague" | |
cx="45" | |
cy="45" | |
r="45" | |
stroke-dasharray="1" | |
pathLength="1" | |
stroke="green" | |
stroke-width="20" | |
fill="transparent" | |
/> | |
</svg> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment