Displaying one div on top of another

后端 未结 5 1601
说谎
说谎 2020-12-13 04:13

I have some HTML with two divs:

\"\"
5条回答
  •  时光说笑
    2020-12-13 04:58

    Use CSS position: absolute; followed by top: 0px; left 0px; in the style attribute of each DIV. Replace the pixel values with whatever you want.

    You can use z-index: x; to set the vertical "order" (which one is "on top"). Replace x with a number, higher numbers are on top of lower numbers.

    Here is how your new code would look:

     

提交回复
热议问题