.test2{
position:absolute;
background: #ff0000;
top: 10px;
left: 50px;
width: 40px;
height: 40px;
transform: translate(0%, 10px);
overflow: hidden;
}
.test1{
background: #314288;
position:absolute;
top: 0px;
left: 0px;
width: 140px;
height: 100px;
}
<div class="test2">
<div class="test1">Texst</div>
</div>