法则四:非同辈元素,任意一者及其祖元素不具备动态布局时,html靠后者居上(无视z-index值)。

情况1:无z-index值

div1-parent {position:static}
div1 {position:static}
div2-parent {position:static}
div2 {position:static}

情况2:设置了z-index值

div3-grand {position:static;
z-index:100}
div3-parent {position:static;
z-index:100}
div3 {position:static;
z-index:100}
div4-grand {position:static}
div4-parent {position:static}
div4 {position:static}