Pure CSS Dial

Developer
Size
3,018 Kb
Views
93,104

How do I make an pure css dial?

An attempt to make a 100% CSS knob / turn dial thingy. First attempt. I'm pretty proud of how it;s turned out. Learned with some simple gradients and well placed box shadow you can get some nice effects. CSS3 is the bizznizz!. What is a pure css dial? How do you make a pure css dial? This script and codes were developed by Luke Watts on 14 August 2022, Sunday.

Pure CSS Dial Previews

Pure CSS Dial - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pure CSS Dial</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="inset"> <div class="chamfer"> <div class="face"> <div class="arrow"></div> <div class="inner"></div> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Pure CSS Dial - Script Codes CSS Codes

*,
*::before,
*::after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
html,
body { min-height: 100%; font-size: 100%; background-color: #af9d9d;
}
.inset { min-height: 11em; width: 11em; margin: 4em auto; -moz-border-radius: 5.5em; -webkit-border-radius: 5.5em; border-radius: 5.5em; background-color: #8c7373; background-image: -webkit-linear-gradient(top, #a38f8f, #baabab); background-image: -moz-linear-gradient(top, #a38f8f, #baabab); background-image: -ms-linear-gradient(top, #a38f8f, #baabab); background-image: -o-linear-gradient(top, #a38f8f, #baabab); background-image: 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);
}
.chamfer { min-height: 9em; width: 9em; position: relative; top: 1em; left: 1em; -moz-border-radius: 4.5em; -webkit-border-radius: 4.5em; border-radius: 4.5em; background-color: #cabebe; background-image: -webkit-linear-gradient(top, #e8e3e3, #aaa1a1); background-image: -moz-linear-gradient(top, #e8e3e3, #aaa1a1); background-image: -ms-linear-gradient(top, #e8e3e3, #aaa1a1); background-image: -o-linear-gradient(top, #e8e3e3, #aaa1a1); background-image: 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);
}
.face { max-width: 8em; min-height: 8em; position: relative; top: 0.5em; left: 0.5em; background-color: #d1c7c7; -moz-border-radius: 4em; -webkit-border-radius: 4em; border-radius: 4em; -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);
}
.arrow { width: 0; height: 0; position: relative; top: 1.35em; left: 1.35em; border-top: 0.5em solid #9f6060; border-right: 0.5em solid transparent;
}
.inner { min-height: 1.5em; max-width: 1.5em; display: block; z-index: 2; position: relative; top: 1em; left: 1.5em; background-color: #cfc9c9; background-image: -webkit-linear-gradient(top, #aaa1a1, #e8e3e3); background-image: -moz-linear-gradient(top, #aaa1a1, #e8e3e3); background-image: -ms-linear-gradient(top, #aaa1a1, #e8e3e3); background-image: -o-linear-gradient(top, #aaa1a1, #e8e3e3); background-image: linear-gradient(to bottom, #aaa1a1, #e8e3e3); -moz-border-radius: 0.75em; -webkit-border-radius: 0.75em; border-radius: 0.75em;
}
Pure CSS Dial - Script Codes
Pure CSS Dial - Script Codes
Home Page Home
Developer Luke Watts
Username lukewatts
Uploaded August 14, 2022
Rating 3.5
Size 3,018 Kb
Views 93,104
Do you need developer help for Pure CSS Dial?

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 web content 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!