How can I get a child of an element with lower z-index on front of a child of another element with higher z-index?

前端 未结 5 1044
甜味超标
甜味超标 2021-01-20 01:27

I have the following setup:

Whatever
<
5条回答
  •  庸人自扰
    2021-01-20 02:04

    This is just an idea which may work.

    1. Get the div having z-index = 9 using jquery.
    2. Then select the 1st child of 1st child of the div having z-index as 9.
    3. Then apply the style as follows:

    $(element which you got).attr("style", "position: absolute; z-index: 12;")

    The style will be applied to the small element and it will be visible on the red box.

提交回复
热议问题