JSFiddle - React, Tailwind, and code Playground
HTML
Move over should show an animated yellow box<br>
<div class="outer">
<div class="inner"></div>
</div>
<br>
1. outer div changed to position fixed<br>
2. yellow box should fade in<br>
CSS
.outer {
position: relative;
padding: 10px;
background-color: green;
}
.inner {
opacity: 0;
background-color: yellow;
width: 100px;
height: 100px;
}
.outer:hover {
position: fixed;
top: 0;
width: 100%;
}
.outer:hover .inner {
opacity: 1;
transition: opacity 1s;
}