Can someone help me stop the inner text here from scaling? its doing my head in and been trying to crack it for a few days now. Don't mind if we have to use some jQuery but no plugins.
CodePen example: http://codepen.io/anon/pen/EaKVQO
CSS:
.image-box{
width: 300px;
overflow:hidden;
}
.image {
text-align: center;
width:300px;
height:200px;
background: url("http://lorempixel.com/300/200");
background-position:center;
transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-webkit-transition: all 1s ease;
-o-transition: all 1s ease;
transform: scale(1.2);
-moz-transform: scale(1.2);
-webkit-transform: scale(1.2);
-o-transform: scale(1.2);
-ms-transform: scale(1.2); /* IE 9 */
}
.image:hover {
transform: scale(1);
-moz-transform: scale(1);
-webkit-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1); /* IE 9 */
}
h2 {
padding: 10px 0 0 0;
}
h2, p {
margin: 0;
padding: 0;
transform: scale(0.8333);
-moz-transform: scale(0.8333);
-webkit-transform: scale(0.8333);
-o-transform: scale(0.8333);
-ms-transform: scale(0.8333); /* IE 9 */
}
HTML:
<div class="image-box">
<div class="image">
<h2>TITLE</h2>
<p>copy is here</p>
</div>
</div>