CSS3 Rainbow Wheel

Developer
Size
2,785 Kb
Views
4,048

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 Previews

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
*/
CSS3 Rainbow Wheel - Script Codes
CSS3 Rainbow Wheel - Script Codes
Home Page Home
Developer Sam Seay
Username samueljseay
Uploaded January 07, 2023
Rating 3
Size 2,785 Kb
Views 4,048
Do you need developer help for CSS3 Rainbow Wheel?

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!

Sam Seay (samueljseay) Script Codes
Create amazing video scripts 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!