さまざまな方法で使用することに違いがあるかどうか、特にメインターゲットがトッププロパティである場合、相対位置ラップの周りで使用するポイントは何ですか? どのような場合にそうすることが重要なのかなど、相対位置ラップの周りでそれを使用する主な目的は何ですか?
これは私が試していたもので、相対位置と静的位置の下で絶対位置を使用することに違いはありません。つまり、「トップ」プロパティに関してです。
<head>
<style>
#box_1 {
position: static;
width: 200px;
height: 100px;
background: yellow;
}
#box_2 {
position: relative;
width: 700px;
height: 60px;
background: red; left:300px;
}
#box_3 {
position: absolute;
width: 700px;
height: 60px;
background: black; left:200px; top: 300px;
}
#box_4 {
position: absolute;
width: 700px;
height: 60px;
background: green; left:200px; top: 300px;
}
</style>
</head>
<body>
<div id="box_1">
<div id="box_2">
<div id="box_3">
</div>
</div>
<div id="box_4">
</div>
</div>
</body>