The background image is attached to a div
with a fixed attachment and a top radius of 50px
. However, during scroll, it gets warped. When I removed the fixed attachment, it worked fine. But with the fixed attachment, it warps backward, creating a 3D effect. This effect only triggers when the div
is a percentage down the viewport. The width of the viewport also affects how big or small this percentage is.
I want to avoid the warping or make it happen when the div
enters the viewport instead of the sudden transition that starts the warping almost halfway down the viewport.
<div className="text-white h-[90vh] w-[100%] **bg-[url('src/assets/ContactSection/contactBg.jpg')]** bg-cover **bg-fixed** flex flex-col justify-between **rounded-t-[100px]** ">