I'm trying to use CSS to create something that looks like a sun (albeit with dark colors) by using a radial gradient and a box-shadow. I'm happy with the result except that there is a small white border between the circumference of the circle and the box-shadow that I can't seem to get rid of; I'd like there to be a seemless transition from the edge of the circle to the shadow. I'm giving a div the following CSS:
#gradient-circle {
background: radial-gradient(#545C6F, #3E4452);
border: 0;
height: 25vh;
width: 25vh;
border-radius: 50%;
box-shadow: 0px 0px 3vw 1vw #3E4452;
}
<div id=gradient-circle />
I've tried all different border types, I've played around with the shadow blur and spread, but nothing seems to get rid of the white border. Any help would be greatly appreciated!
The issue is that
border-radiusproduces sharp edges around so whatever color is behind that element will bleed inside.Instead we can use a background to produce the shadow box effect without
border-radius