I can give a div this gradient and make it absolute and place it at the right position, but how do I make it semi-circle?
<div
className="absolute top-[50%] right-[-600px] w-[50%] h-[50%] opacity-40"
style={{
background:
"linear-gradient(73.4deg, rgba(16, 134, 144, 0.4) 3.31%, rgba(82, 190, 199, 0.4) 57.52%, rgba(252, 207, 18, 0.4) 91.12%)",
zIndex: -1
}}
></div>
Adding tailwind class rounded-full
does not help.
2
Answers
Have the left corner radii be
999px
viarounded-l-full
. Also for a true semicircle, you’d want to have the width to be half of the height.You can use border-radius to achieve this, just make the radius two times smaller than your height or vise-versa, depending on how you want the half-circle to layout.