Home > Mobile >  Showing image/icon over components
Showing image/icon over components

Time:01-13

I'm using react, and I have an icon which is an image, the issue is that the position of it is fixed, it's showing and working normally as I want except when scrolling to another component such as carousel or cards, you can see from the pics, how can I fix this?

This is how it's shown

This what happens when user scrolls to another component

CodePudding user response:

use z-index

You should give the z-index of the icon div higher than the z-index of the carousel or card div

example

`.icon{z-index:99999,position:'fixed'}`
<div class='icon'>your icon<div>
  • Related