Note that there are some explanatory texts on larger screens.

plurals
  1. POImage to pop up in front another image in 3D while hovering
    text
    copied!<p>Here is a fiddle to demonstrate my question <em><a href="http://jsfiddle.net/vhvet" rel="nofollow">FIDDLE</a></em></p> <p><strong>CSS:</strong></p> <pre><code>#email { list-style: none; margin: 100px 0; height: 550px; } #email li { display: inline; float: left; -webkit-perspective: 500; -webkit-transform-style: preserve-3d; -webkit-transition-property: perspective; -webkit-transition-duration: 0.5s; -moz-perspective: 500; -moz-transform-style: preserve-3d; -moz-transition-property: perspective; -moz-transition-duration: 0.5s; } #email li:hover { -webkit-perspective: 5000; -moz-perspective: 5000; } #email li div { border: 10px solid #fcfafa; -webkit-transform: rotateY(30deg); -moz-transform: rotateY(30deg); -moz-box-shadow:0 3px 10px #888; -webkit-box-shadow:0 3px 10px #888; -webkit-transition-property: transform; -webkit-transition-duration: 0.5s; -moz-transition-property: transform; -moz-transition-duration: 0.5s; } #email li:hover div { -webkit-transform: rotateY(0deg); -moz-transform: rotateY(0deg); } </code></pre> <p><strong>HTML:</strong></p> <pre><code>&lt;ul id="email"&gt; &lt;li&gt; &lt;div style="width: 180px; height: 180px; margin-bottom: 10px; background-color:green"&gt;&lt;div&gt; &lt;div style="width: 250px; height: 200px; margin-left: 5px; margin-bottom: 10px; background-color: red"&gt;&lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>As you can see in the fiddle, I have used two different div elements in <strong>3D</strong>: one in front and the other behind it.</p> <p>Now when I hover over the div, the position changes. While hovering, I need the div with the green colour to align in front of the div with the red colour. </p> <p>I am new to CSS, so looking for any help. Thanks</p>
 

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