Is it possible to use position relative more than once in the same html page?

前端 未结 2 1661
一个人的身影
一个人的身影 2021-01-26 09:49

I am using \'position relative\' and \'position absolute\' on my master page.

I have a page that use the above master page, And I am trying to use in this page the \'Pos

2条回答
  •  后悔当初
    2021-01-26 10:40

    When one uses position: absolute it is calculated based on the ancestor, not sibling, so your .two and .four divs are positioned relatively to the body, not .one and .two, use this instead:

提交回复
热议问题