Pure CSS pie timer

Developer
Size
3,378 Kb
Views
85,008

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 Previews

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; }
}
Pure CSS pie timer - Script Codes
Pure CSS pie timer - Script Codes
Home Page Home
Developer Hugo Giraudel
Username HugoGiraudel
Uploaded August 09, 2022
Rating 4.5
Size 3,378 Kb
Views 85,008
Do you need developer help for Pure CSS pie timer?

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!

Hugo Giraudel (HugoGiraudel) Script Codes
Create amazing blog posts with AI!

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!