.box1 {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
width: 50%;
height: 50%;
top:0;left:0;bottom:0;right:0;
margin:auto;
border:1px solid #333333;
}
.box2 {
width: 120%;
height: 120%;
flex-shrink: 0;
background: blue;
opacity:0.5;
}