1 2 3 4 5 6 7 8 9 10 11 12 13 14
<!doctype html> <style> div { display: none; } div::before { content: "Should appear"; } </style> <div></div> <script> document.documentElement.offsetTop; document.querySelector('div').style.display = "block"; </script>