Pure CSS pie timer
How do I make an pure css pie timer?
Thanks @Joshua Hibbert for the border-radius trick. :)Be sure to have a look at : * The GitHub repo: https://github.com/HugoGiraudel/CSS-Pie-Timer . What is a pure css pie timer? How do you make a pure css pie timer? This script and codes were developed by Hugo Giraudel on 09 August 2022, Tuesday.
Pure CSS pie timer - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pure CSS pie timer</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ .wrapper { position: relative; margin: 40px auto; background: white;
}
.wrapper, .wrapper * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
.wrapper { width: 250px; height: 250px;
}
.wrapper .pie { width: 50%; height: 100%; transform-origin: 100% 50%; position: absolute; background: #08C; border: 5px solid rgba(0,0,0,0.5);
}
.wrapper .spinner { border-radius: 100% 0 0 100% / 50% 0 0 50%; z-index: 200; border-right: none; animation: rota 5s linear infinite;
}
.wrapper:hover .spinner,
.wrapper:hover .filler,
.wrapper:hover .mask { animation-play-state: running;
}
.wrapper .filler { border-radius: 0 100% 100% 0 / 0 50% 50% 0; left: 50%; opacity: 0; z-index: 100; animation: opa 5s steps(1, end) infinite reverse; border-left: none;
}
.wrapper .mask { width: 50%; height: 100%; position: absolute; background: inherit; opacity: 1; z-index: 300; animation: opa 5s steps(1, end) infinite;
}
@keyframes rota { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }
}
@keyframes opa { 0% { opacity: 1; } 50%, 100% { opacity: 0; }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="wrapper"> <div class="pie spinner"></div> <div class="pie filler"></div> <div class="mask"></div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Pure CSS pie timer - Script Codes CSS Codes
.wrapper { position: relative; margin: 40px auto; background: white;
}
.wrapper, .wrapper * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
.wrapper { width: 250px; height: 250px;
}
.wrapper .pie { width: 50%; height: 100%; transform-origin: 100% 50%; position: absolute; background: #08C; border: 5px solid rgba(0,0,0,0.5);
}
.wrapper .spinner { border-radius: 100% 0 0 100% / 50% 0 0 50%; z-index: 200; border-right: none; animation: rota 5s linear infinite;
}
.wrapper:hover .spinner,
.wrapper:hover .filler,
.wrapper:hover .mask { animation-play-state: running;
}
.wrapper .filler { border-radius: 0 100% 100% 0 / 0 50% 50% 0; left: 50%; opacity: 0; z-index: 100; animation: opa 5s steps(1, end) infinite reverse; border-left: none;
}
.wrapper .mask { width: 50%; height: 100%; position: absolute; background: inherit; opacity: 1; z-index: 300; animation: opa 5s steps(1, end) infinite;
}
@keyframes rota { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }
}
@keyframes opa { 0% { opacity: 1; } 50%, 100% { opacity: 0; }
}
Developer | Hugo Giraudel |
Username | HugoGiraudel |
Uploaded | August 09, 2022 |
Rating | 4.5 |
Size | 3,378 Kb |
Views | 85,008 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Stripe-a-gradient Sass function | 11,192 Kb |
Sass mixin for scrollbar styling | 2,400 Kb |
Content through Media Queries | 9,350 Kb |
Pure CSS button switch | 4,769 Kb |
A Pen by Hugo Giraudel | 3,061 Kb |
Synchronise background position with padding | 3,411 Kb |
Pure CSS light switch | 4,088 Kb |
Database CRUD JS Class | 4,236 Kb |
Single element CSS character | 11,626 Kb |
Social swatchbook | 4,245 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Lecture 1 | Law | 0 Kb |
Pink expansion tunnel | Vez | 1,738 Kb |
Background Images | Jooonebug | 2,100 Kb |
A Pen by Jay | Jaycode | 3,784 Kb |
Simple DevTools | Deegill | 2,511 Kb |
Kudos Please | TimPietrusky | 6,624 Kb |
Prototype Responsive Homepage | Heyitsolivia | 7,677 Kb |
Rrremark.com Overlay Highlighter | Derickruiz | 4,438 Kb |
JQuery exercise | Brian-baum | 3,780 Kb |
Navcube | Wbarlow | 4,775 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!