I'm not realizing why this transition (translate) only works for <p>
and not for <span>
, in firefox. Someone help me?
HTML:
<div id="severalWork">
<a href="#">
<img src="http://krystalmilton.weebly.com/uploads/1/4/9/7/14972372/4978277.jpg?185"><divclass="detailsHover">
<span>span span</span>
<p>para<br />para</p>
</div>
</a>
</div>
CSS:
#severalWork a {
display: inline-block;
width: 100px;
height: 100px;
text-decoration: none;
position: relative;
overflow: hidden;
}
#severalWork a img {
position: absolute;
left: 0;
opacity: 1;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: scale(1.1);
transform: scale(1.1);
width: 100%;
}
.detailsHover {
height: 100% !important;
width: 100%;
position: relative;
background-color:rgba(255, 255, 255, 0.7);
bottom: 0;
opacity: 0;
-webkit-transition: opacity 0.35s, background-color 0.35s;
transition: opacity 0.35s, background-color 0.35s;
overflow:hidden;
}
.detailsHover span {
font-size: 12px;
top: 30%;
position: relative;
text-transform: uppercase;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
-webkit-transform: translate3d(0,20px,0) scale(1.1);
transform: translate3d(0,20px,0) scale(1.1);
}
.detailsHover p {
font-size: 14px;
top: 30%;
position: relative;
text-align: center;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
-webkit-transform: translate3d(0,20px,0) scale(1.1);
transform: translate3d(0,20px,0) scale(1.1);
}
#severalWork a:hover img {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
#severalWork a:hover .detailsHover {
opacity: 1;
}
#severalWork a:hover .detailsHover p {
opacity: 1;
-webkit-transform: translate3d(0,0,0) scale(1);
transform: translate3d(0,0,0) scale(1);
}
#severalWork a:hover .detailsHover span {
opacity: 1;
-webkit-transform: translate3d(0,0,0) scale(1);
transform: translate3d(0,0,0) scale(1);
}