21 lines
771 B
HTML
21 lines
771 B
HTML
<html>
|
|
<body>
|
|
<div style="width: 18px; position: relative">
|
|
<div id="t1" style="float: right; background-color: silver; width: 10px; height: 100px">
|
|
</div>
|
|
<div id="t2">
|
|
<div>
|
|
<div style="float: right; background-color: orange; width: 5px; height: 50px"></div>
|
|
<div style="background-color: blue;">A B C D<div style="float: right; background-color: green; width: 5px; height: 50px"></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
document.body.offsetTop;
|
|
t2.style.position = 'absolute';
|
|
document.body.offsetTop;
|
|
t2.style.position = 'static';
|
|
</script>
|
|
</body>
|
|
</html>
|