Click through div to underlying elements

后端 未结 16 2061
逝去的感伤
逝去的感伤 2020-11-21 06:19

I have a div that has background:transparent, along with border. Underneath this div, I have more elements.

Curre

16条回答
  •  被撕碎了的回忆
    2020-11-21 06:32

    I think that you can consider changing your markup. If I am not wrong, you'd like to put an invisible layer above the document and your invisible markup may be preceding your document image (is this correct?).

    Instead, I propose that you put the invisible right after the document image but changing the position to absolute.

    Notice that you need a parent element to have position: relative and then you will be able to use this idea. Otherwise your absolute layer will be placed just in the top left corner.

    An absolute position element is positioned relative to the first parent element that has a position other than static. If no such element is found, the containing block is html

    Hope this helps. See here for more information about CSS positioning.

提交回复
热议问题