Pure CSS Dial 01
How do I make an pure css dial 01?
V2 of http://codepen.io/lukewatts/pen/aGJkyReduced the html from 5 seperate elements to 3. Only 2 are actually needed for the dial. The container is simply for relative positioning...like....a container. Also added helper functions in the styles to makeit easier to control and edit.. What is a pure css dial 01? How do you make a pure css dial 01? This script and codes were developed by Luke Watts on 14 August 2022, Sunday.
Pure CSS Dial 01 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pure CSS Dial 01</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/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container"> <div class="base"> <div class="face"></div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Pure CSS Dial 01 - Script Codes CSS Codes
.all, .base::before, .base::after, .face::before, .face::after { content: ""; display: block; position: absolute;
}
*,
*::before,
*::after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
html,
body { min-height: 100%; font-size: 100%;
}
body { background-color: #af9d9d;
}
.container { height: 11.25em; width: 11.25em; -moz-border-radius: 5.625em; -webkit-border-radius: 5.625em; border-radius: 5.625em; position: relative; margin: 4em auto;
}
.base { height: 11em; width: 11em; -moz-border-radius: 5.5em; -webkit-border-radius: 5.5em; border-radius: 5.5em; background: #8c7373; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2EzOGY4ZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2JhYWJhYiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a38f8f), color-stop(100%, #baabab)); background: -moz-linear-gradient(top, #a38f8f, #baabab); background: -webkit-linear-gradient(top, #a38f8f, #baabab); background: linear-gradient(to bottom, #a38f8f, #baabab); -moz-box-shadow: inset 0 -3px 5px rgba(255, 255, 255, 0.1); -webkit-box-shadow: inset 0 -3px 5px rgba(255, 255, 255, 0.1); box-shadow: inset 0 -3px 5px rgba(255, 255, 255, 0.1);
}
.base::before { height: 9em; width: 9em; -moz-border-radius: 4.5em; -webkit-border-radius: 4.5em; border-radius: 4.5em; position: absolute; top: 1em; left: 1em; background-color: #cabebe; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U4ZTNlMyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYTFhMSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e8e3e3), color-stop(100%, #aaa1a1)); background: -moz-linear-gradient(top, #e8e3e3, #aaa1a1); background: -webkit-linear-gradient(top, #e8e3e3, #aaa1a1); background: linear-gradient(to bottom, #e8e3e3, #aaa1a1); -moz-box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 -3px 3px rgba(255, 255, 255, 0.2); -webkit-box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 -3px 3px rgba(255, 255, 255, 0.2); box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 -3px 3px rgba(255, 255, 255, 0.2);
}
.base::after { height: 8em; width: 8em; -moz-border-radius: 4em; -webkit-border-radius: 4em; border-radius: 4em; position: absolute; top: 1.5em; left: 1.5em; background-color: #d1c7c7; -moz-box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.4); -webkit-box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.4); box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.4);
}
.face { height: 8em; width: 8em; -moz-border-radius: 4em; -webkit-border-radius: 4em; border-radius: 4em; position: absolute; top: 1.5em; left: 1.5em; z-index: 1;
}
.face::before { height: 0; width: 0; position: absolute; top: 1.375em; left: 1.375em; border-top: 0.5em solid #9f6060; border-right: 0.5em solid transparent;
}
.face::after { height: 1.5em; width: 1.5em; -moz-border-radius: 0.75em; -webkit-border-radius: 0.75em; border-radius: 0.75em; position: absolute; top: 1.5em; left: 1.5em; background-color: #cfc9c9; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2FhYTFhMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U4ZTNlMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #aaa1a1), color-stop(100%, #e8e3e3)); background: -moz-linear-gradient(top, #aaa1a1, #e8e3e3); background: -webkit-linear-gradient(top, #aaa1a1, #e8e3e3); background: linear-gradient(to bottom, #aaa1a1, #e8e3e3);
}
Developer | Luke Watts |
Username | lukewatts |
Uploaded | August 14, 2022 |
Rating | 3 |
Size | 3,925 Kb |
Views | 30,360 |
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 |
Custom Google Maps | 5,076 Kb |
Animated Hover Effects | 9,360 Kb |
Product Item Additional Info On Hover | 6,792 Kb |
Footer Concept 02 | 10,469 Kb |
SmartQRTravel Login Form | 4,102 Kb |
Before and After Image Slider | 2,747 Kb |
Pure CSS Dial | 3,018 Kb |
AFFINITY4 SERVICES ANIMATION | 2,902 Kb |
Webkit Background Text Clip | 2,808 Kb |
OFF CANVAS MENU | 3,206 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 |
Mapbox Directions with geolocation tracking | Pollardld | 5,827 Kb |
Project -Show the Local Weather | Luciano_Britis | 2,583 Kb |
A Pen by Mike Otis | Mikeotis | 3,185 Kb |
Custom Checkbox and radio inputs SCSS | Rgfx | 3,367 Kb |
Sketchy Box | Mnicpt | 3,033 Kb |
Toggle menu | Seyedi | 2,279 Kb |
Apple website | Jds317 | 1,835 Kb |
Simple checkbox style | Vncnz | 2,628 Kb |
Prototype Responsive Homepage | Heyitsolivia | 7,677 Kb |
Ocean | Gordonnl | 2,817 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!