Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there a bug in Chrome's CSS visibility rendering?
    primarykey
    data
    text
    <p>There seems to be odd behavior in Chrome 15+ when using this particular combination of CSS properties, namely an outer element with visibility hidden and fixed positioning and an absolutely or relatively positioned inner element that has an override on visibility.</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div style="position:fixed;visibility:hidden;"&gt; &lt;div style="position:absolute;visibility:visible;"&gt; &lt;img src="https://www.google.com/intl/en_com/images/srpr/logo3w.png" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; for(var i=0; i&lt;100; i++) { document.write("&lt;br /&gt;"); } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The code snippet above produces this image when scrolled. <img src="https://i.stack.imgur.com/KSmfh.png" alt="Chrome visibility issue"></p> <p>The fact that both relative and absolute positioning both reproduce the behavior can be chalked up to the fact that for this particular DOM absolute positioning is equivalent to relative positioning.</p> <p>In the case that this markup is valid and does have defined behavior, this points to a bug in the browser/rendering engine, and it looks like a performance optimization gone bad, especially given that this behavior was introduced with the Chrome 15 update.</p> <p><a href="http://jsfiddle.net/bHzWN/show/" rel="noreferrer">JSFiddle link</a> courtesy of Sparky672</p> <p>Update:</p> <p>This behavior has been reported to the <a href="https://bugs.webkit.org/show_bug.cgi?id=76126" rel="noreferrer">WebKit Bugzilla</a> and seems that the changeset that introduced the bug has been identified. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload