css positioning z-index negative margins

后端 未结 3 1998
梦如初夏
梦如初夏 2021-02-07 02:18

I have the following html - no matter what i do I cant seem to get the middle div to appear on top of the top and also on top of the bottom. It sits fine above the top but where

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-07 02:55

    If you mean "on top" by hiding the first one while seeing the second, you should add "position:absolute" If you mean by order, you can use the following lines:

    var d = getElementById("..."); var p = d.parentNode; p.removeChild(d);

    and than add to index, or add all of them anew in the required order.

提交回复
热议问题