Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As Donte Trumble says, I don't think that it can be done without adding another div ... unless you cheat a little.</p> <p>Here is my solution</p> <p><a href="http://jsfiddle.net/zbvrp/2/" rel="nofollow">updated fiddle</a></p> <p>and the CSS</p> <pre><code>.transform{ width: 200px; height: 200px; position: relative; border: 1px solid white; background-color: #DDD; vertical-align: bottom; -o-transition:.5s; ms-transition:.5s; moz-transition:.5s; webkit-transition:.5s; transition:.5s; } .transform:hover { background-color: #CACACA; -moz-transform: matrix(1, 0.05, 0.01, 1, 0, 0) scale(0.95,0.95); -webkit-transform: matrix(1, 0.05, 0.01, 1, 0, 0) scale(0.95,0.95); transform: matrix(1, 0.05, 0.01, 1, 0, 0) scale(0.95,0.95); } .transform:before { content: ""; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; background-color: white; z-index: -1; -o-transition:.5s; ms-transition:.5s; moz-transition:.5s; webkit-transition:.5s; transition:.5s; } .transform:hover:before { -moz-transform: matrix(1.0005, -0.05, -0.01, 1.0005, 0, 0) scale(1.05,1.05); -webkit-transform: matrix(1.0005, -0.05, -0.01, 1.0005, 0, 0) scale(1.05,1.05); transform: matrix(1.0005, -0.05, -0.01, 1.0005, 0, 0) scale(1.05,1.05); } .transform:after { content: "Content"; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; background-color: #DDD; z-index: 1; -o-transition:.5s; ms-transition:.5s; moz-transition:.5s; webkit-transition:.5s; transition:.5s; } .transform:hover:after { background-color: #cacaca; } </code></pre> <p>I won't explain you were I cheated .. I leave it to you to find out ..</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.
    1. This table or related slice is empty.
    1. VO
      singulars
      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