CSS pie countdown timer
See original GitHub issueDescribe the feature you want: I have no idea what you’re doing behind the scenes to generate PNGs for the countdown timer, but there is an efficient way to do it with SVG and CSS animations.
To change the time it takes simply change the animation duration.
To continue it from a specific point simply change the last 100 in stroke-dasharray:100 0 100;
to whatever % you want (remember to change animation time to reflect).
<svg class="otpPie" viewBox="0 0 64 64"><circle class="pieBG" cx="32" cy="32" r="31.75"/><circle class="pie1" cx="-32" cy="32" r="15.9"/></svg>
.otpPie {width:32px;height:32px; margin-right:1em; vertical-align:middle; }
.pieBG {fill:#555; animation:60s linear 0s infinite both eatPieBG;}
.pie1 { transform:rotate(-90deg);fill:none; stroke:rgb(50,200,50); stroke-width:31.8; stroke-dashoffset:100; stroke-dasharray:100 0 100; /*ignore, offset, % */
animation:60s linear 0s infinite eatPie; }
@keyframes eatPie { to {stroke-dasharray:100 0 0;} }
@keyframes eatPieBG { 50% {fill:#555;} to {fill:#a00;} }
Why do you want this feature in Authenticator? To be smooooooth 😎
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
CSS Pie Timer Re-Revisited - CSS-Tricks
Kitty reflected on an ancient blog post here on CSS-Tricks on how to make an animated pie timer. The old technique is still...
Read more >CSS pie timer revisited - Kitty Giraudel
In my original approach, I needed a container and 3 child elements. In this version, I managed to sort it out with a...
Read more >CSS Jquery Pie Countdown Timer - CodePen
Pie timer with CSS Jquery using linear-gradient....
Read more >CSS-Pie-Chart-Timer/README.md at master - GitHub
Create a pie chart timer/countdown using CSS and Javascript. CSS Pie Chart Timer works fine on these browsers: IE 9; Opera; Firefox; Chrome....
Read more >Free jQuery countdown Plugins - jQueryScript.Net
pietimer is a simple jQuery plugin that allows you to create a circular pie graph-like timer using CSS3 and jQuery. Good for countdown...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@alystair That’s okay. Then we will commit your code into the project. Thanks for your contribution!
Done