20 lines
686 B
HTML
20 lines
686 B
HTML
<body>
|
|
<div style="background-color: red; width: 100px; height: 100px;">You should not see this. Resize the window.</div>
|
|
<div id="target" style="position: absolute; left: 8; top: 108px;">
|
|
<div style="position: absolute; left: 0; top: 0;">
|
|
<div style="visibility: visible; width: 100px; height: 100px; background-color: green;"></div>
|
|
<button>Button</button>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
function test()
|
|
{
|
|
document.body.offsetTop;
|
|
var t = document.getElementById("target");
|
|
t.style.visibility = "hidden";
|
|
t.style.top = "8";
|
|
}
|
|
test();
|
|
</script>
|
|
</body>
|