I'm trying to create a multi-coloured circle in CSS to simulate a wheel of fortune, I've tried using linear gradients but it just applies strips of colour running vertically through the circular div rather than being coloured areas as if you were cutting up a pizza if that makes sense?
This is the code I've tried:
background: -moz-linear-gradient(left, red, red 20%, blue 20%, blue);
Which results in:
But I want it to look more like this?:
Is this possible in CSS or am I going to have to use a background image (I'd rather avoid this because it isn't as easy to scale as the page resizes etc..)?
It can be done using something called conic gradients. Unfortunately, they're not supported by many browsers right now. Lea Verou created a lightweight JS plugin though that can enable their usage:
https://leaverou.github.io/conic-gradient/
This could be used to create: