Note that there are some explanatory texts on larger screens.

plurals
  1. POHaving trouble implementing -webkit-transform to scale up images in a photo gallery
    primarykey
    data
    text
    <p>I have a conceptual question about photo galleries like this:</p> <p><a href="http://www.nikesh.me/demo/image-hover.html" rel="nofollow">http://www.nikesh.me/demo/image-hover.html</a></p> <p>If you open this in a browser that supports CSS Transitions (for example Chrome), it will smoothly scale the hovered image whilst the zoomed version remains of a high quality.</p> <p>This is accomplished by showing the non-zoomed images into a slightly smaller version than they really are, in essence the zoom shows them in their true dimensions. </p> <p>So, normal images are first scaled down:</p> <pre><code>-webkit-transform:scale(0.8); </code></pre> <p>And then upon hover scaled up:</p> <pre><code>-webkit-transform:scale(1.2); </code></pre> <p>My question: How is the initial scaling down supposed to work for browsers that do not support this method of scaling down? Try opening that gallery in IE to see what I mean, it shows the images not scaled down, which makes them too large and thereby they break the layout. </p> <p><strong>What I want:</strong></p> <ul> <li>The full effect in browsers that support it. Important is that the zoomed version remains quality.</li> <li>No effect at all for browsers that do not support it, yet a solid original dimension so that no layout is broken</li> <li>It should work for both image orientations and there may be variety in image widths and heights too</li> </ul> <p>Anyone? Preferably an elegant solution that does not need browser sniffing or javascript, but all answers are welcome.</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.
    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