Home > Blockchain >  How to show a floating image above the modal border in React native?
How to show a floating image above the modal border in React native?

Time:04-29

Is there any way to achieve this effect in react native? I have an image that is supposed to pop on top of the modal margin.

Floating Modal Image

Edit: I've already tried with position: 'absolute' and negative margin top or top but the image goes beneath the margin of the modal like this:

Image under Modal

CodePudding user response:

Yes, use position: 'absolute' and negative top or marginTop. The image must have a transparent background.

CodePudding user response:

You need to use zIndex.

here is a sample code that can help you.

https://snack.expo.dev/@asifiqubal/modal

  • Related