Looking to add a unique touch to my React project with a shadow effect resembling an arch shape at the top of an image using Tailwind CSS. The ultimate goal is to create a semi-transparent arch-shaped shadow covering the top portion of the image, similar to the example image provided.
https://i.sstatic.net/f5H3tfS6.png
Here's what I've attempted thus far:
.arch-shadow {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
background: rgba(0, 0, 0, 0.5);
border-radius: 100% 100% 0 0;
z-index: 1;
}
<div ref={viewRef} className="w-full relative flex justify-center">
<CardImgFrame
imageUrl={imageUrl}
alt={title}
frameClassName="aspect-4/5 h-[516px] relative z-10"
imageClassName="object-fill"
priority={true}
/>
<div className="arch-shadow"></div>
{description && (
<p className="absolute text-white bottom-3 font-semibold z-20">
{title}
</p>
)}
</div>
The objective is to have a semi-transparent arch-shaped shadow covering the top part of the image, providing a unique shadow overlay effect with an arch shape at the top.
Current implementation either covers the entire image or fails to achieve the desired arch-shaped effect at the top of the image.