CSS3 Rainbow Wheel
How do I make an css3 rainbow wheel?
Got the idea from ❆ http://codepen.io/bitmap/pen/eBbHt Detailed explanation about how I computed angles and % values: . What is a css3 rainbow wheel? How do you make a css3 rainbow wheel? This script and codes were developed by Sam Seay on 07 January 2023, Saturday.
CSS3 Rainbow Wheel - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS3 Rainbow Wheel</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <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! */ body { background: gainsboro; }
.colorWheel { position: relative; margin: 1em auto; border: solid 2em white; width: 16em; height: 16em; border-radius: 50%; background: linear-gradient(20deg, #272b66 42.34%, transparent 42.34%) 0 0, linear-gradient(72deg, #2d559f 75.48%, transparent 75.48%) 0 0, linear-gradient(-36deg, #9ac147 42.34%, transparent 42.34%) 100% 0, linear-gradient(-72deg, #639b47 75.48%, transparent 75.48%) 100% 0, linear-gradient(36deg, transparent 57.66%, #e1e23b 57.66%) 100% 100%, linear-gradient(72deg, transparent 24.52%, #f7941e 24.52%) 100% 100%, linear-gradient(-36deg, transparent 57.66%, #662a6c 57.66%) 0 100%, linear-gradient(-72deg, transparent 24.52%, #9a1d34 24.52%) 0 100%, #43a1cd linear-gradient(#ba3e2e, #ba3e2e) 50% 100%; background-repeat: no-repeat; background-size: 50% 50%; transition: 1s;
}
.colorWheel:after { position: absolute; top: 50%; left: 50%; margin: -2.8em; width: 5.6em; height: 5.6em; border-radius: 50%; /* add slash at end of line to see central part * opacity: .15; /**/ background: white; content: '';
}
.colorWheel:hover { transform: rotate(360deg);
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class='colorWheel'></div> <script src="js/index.js"></script>
</body>
</html>
CSS3 Rainbow Wheel - Script Codes CSS Codes
body { background: gainsboro; }
.colorWheel { position: relative; margin: 1em auto; border: solid 2em white; width: 16em; height: 16em; border-radius: 50%; background: linear-gradient(20deg, #272b66 42.34%, transparent 42.34%) 0 0, linear-gradient(72deg, #2d559f 75.48%, transparent 75.48%) 0 0, linear-gradient(-36deg, #9ac147 42.34%, transparent 42.34%) 100% 0, linear-gradient(-72deg, #639b47 75.48%, transparent 75.48%) 100% 0, linear-gradient(36deg, transparent 57.66%, #e1e23b 57.66%) 100% 100%, linear-gradient(72deg, transparent 24.52%, #f7941e 24.52%) 100% 100%, linear-gradient(-36deg, transparent 57.66%, #662a6c 57.66%) 0 100%, linear-gradient(-72deg, transparent 24.52%, #9a1d34 24.52%) 0 100%, #43a1cd linear-gradient(#ba3e2e, #ba3e2e) 50% 100%; background-repeat: no-repeat; background-size: 50% 50%; transition: 1s;
}
.colorWheel:after { position: absolute; top: 50%; left: 50%; margin: -2.8em; width: 5.6em; height: 5.6em; border-radius: 50%; /* add slash at end of line to see central part * opacity: .15; /**/ background: white; content: '';
}
.colorWheel:hover { transform: rotate(360deg);
}
CSS3 Rainbow Wheel - Script Codes JS Codes
/*
anyone interested in me writing a detailed explanation about the maths of how to compute angles and percentages for the gradients?
Explained here http://hugogiraudel.com/blog/css-gradients
*/
Developer | Sam Seay |
Username | samueljseay |
Uploaded | January 07, 2023 |
Rating | 3 |
Size | 2,785 Kb |
Views | 4,048 |
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 |
Matrix Digital Rain | 2,393 Kb |
UIkit date time sandbox | 1,713 Kb |
A Pen by Sam Seay | 1,889 Kb |
Bootstrap Template | 1,709 Kb |
CSS3 keyframe onload animation. | 1,706 Kb |
Magazine Cover | 2,295 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 |
Display properties | Hamzaerbay | 1,886 Kb |
Animated rainbow wave on canvas | Icodeforlove | 2,777 Kb |
NT Tribute | Skybutterfly | 2,850 Kb |
TweenMax transformOrigin Bubble | Nicolund | 2,209 Kb |
Simple DevTools | Deegill | 2,511 Kb |
Pagepilling.js | Blossk | 6,554 Kb |
BenU Maintenance Site | Ksherman | 4,893 Kb |
Classy Blockquote Styling | Andrewwright | 3,212 Kb |
Simple content swap | Snografx | 1,859 Kb |
CSS3 Fullscreen Background Slideshow | Leetech | 3,435 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!