Pure CSS Dial 01

Developer
Size
3,925 Kb
Views
30,360

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 Previews

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);
}
Pure CSS Dial 01 - Script Codes
Pure CSS Dial 01 - Script Codes
Home Page Home
Developer Luke Watts
Username lukewatts
Uploaded August 14, 2022
Rating 3
Size 3,925 Kb
Views 30,360
Do you need developer help for Pure CSS Dial 01?

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!

Luke Watts (lukewatts) Script Codes
Create amazing Facebook ads 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!