#Div that slides over rest of the page

1 messages · Page 1 of 1 (latest)

reef magnet
#

Hey,
I have two divs. When the second div comes in view, i want it to slide over the other one so that it fully covers the screen at the end. This is my code:

<div className="w-screen h-[1000px] bg-white"></div>
<div className="w-screen h-[1000px] bg-black"></div>

Does somebody know how I can accomplish this?

oak kernelBOT
#

Hi @reef magnet. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Hmm, I don't know enough to give you a confident answer yet. However, you can explore the Next.js documentation on styling to find a suitable solution for your use case: Next.js Styling Documentation (https://nextjs.org/docs/basic-features/built-in-css-support).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: