position-relative-014.html (641B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1463425"> 3 <link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> 4 <style> 5 .box { 6 display: inline-block; 7 background-color: green; 8 width: 100px; 9 height: 50px; 10 } 11 </style> 12 <p>Test passes if there is a filled green square.</p> 13 <div style="width: 100px; background: red; line-height: 0;"> 14 <div id="target" style="position: relative; left: -100px;" class="box"></div> 15 <div class="box"></div> 16 </div> 17 <script> 18 document.body.offsetTop; 19 const target = document.getElementById('target'); 20 target.style.left = '0px'; 21 </script>