When I try to make a cube transition inside of a container when the trigger div is hovered over but it isn't triggering the transition. However, if I swap out the id of the trigger with something that isn't a class or id lets say body it works! The moment I switch it out for something that has a class or id again it stops working!
https://codepen.io/anon/pen/PEwoXb
pre {
background-color: cornflowerblue;
color: white;
margin: 5px auto 5px auto;
width: 50%;
padding: 5px;
}
.trans-box-holder {
display: block;
background: #ffffff;
height: 250px;
border: 1px cornflowerblue solid;
}
.trans-box {
display: inline-block;
background: pink;
width: 100px;
height: 100px;
}
#trans_box_1 {
transition: transform 300ms ease-in-out 0s;
}
/* If you swap out #pre_opacity for body it works for some reason! */
#pre_opacity:hover #trans_box_1 {
transform: translate(200px, 150px) rotate(20deg);
}
<pre id="pre_opacity">
.element {
transition: opacity 300ms ease-in-out 1s;
}
</pre>
<div class="trans-box-holder">
<div class="trans-box" id="trans_box_1"></div>
</div>