Stacking DIVs on top of each other?

前端 未结 9 2303
暗喜
暗喜 2020-12-02 07:59

Is it possible to stack up multiple DIVs like:

&l
9条回答
  •  孤城傲影
    2020-12-02 08:21

    I know that this post is a little old but I had the same problem and tried to fix it several hours. Finally I found the solution:

    if we have 2 boxes positioned absolue

    we do expect that there will be one box on the screen. To do that we must set margin-bottom equal to -height, so doing like this:

    works fine for me.

提交回复
热议问题