JSFiddle - React, Tailwind, and code Playground

by bazmegakapa

HTML

<div id="wrap">
<div class="container">
   <img src="image.jpg" />
   <div class="text">
      THIS TEXT IS HIDDEN WHEN POSITIONED OUTSIDE OF .container
   </div>
</div>
</div>

CSS

#wrap { position: relative; }

.container{
    overflow:hidden;
    width: 500px; height: 250px;
    background: cyan;
}
.text {
    position: absolute;
    top: 280px; left: 0;
}