JSFiddle - React, Tailwind, and code Playground
by Yuan Hong
HTML
<div class="myPic">
<div class="myHoverDiv">
</div>
</div>
<div class="myPic2"></div>
CSS
.myPic
{
background-color:red;
margin-left:50px;
margin-top:50px;
width:100px;
height:100px;
transition-property: all;
-moz-transition-property: all;
-webkit-transition-property: all;
-o-transition-property: all;
transition-duration: 0.5s;
-webkit-transition-duration: 0.5s;
transition-timing-function: linear;
-webkit-transition-timing-function: linear;
}
.myHoverDiv
{
margin-left:-25px;
margin-top:-25px;
display:none;
width:150px;
height:150px;
background-color:green;
}
.myPic:hover .myHoverDiv
{
display:block;
}