JSFiddle - React, Tailwind, and code Playground

HTML

<div id="main" style="position:relative;z-index:1;">
     
     <div class="container"><div id="lefttop" class="resizer">left top</div></div>
     <div class="container"><div id="righttop" class="resizer">right top</div></div>
     <p style="clear:both;"></p>
     <div class="container"><div id="leftbottom" class="resizer">left bottom</div></div>
     <div class="container"><div id="rightbottom" class="resizer">right bottom</div></div>
 
 </div>

CSS

.resizer { position:relative; border: 1px solid #000000; padding:10px; margin:0px; width:150px; height:150px; }

.container { position:relative; padding:0px; margin:8px; float:left; z-index: 2; width:172px; height:172px; }

JavaScript

$(function(){
     $(".resizer").mouseover(function() {
         $(".container").css('z-index' , '2');
         $(this).parent().css('z-index' , '3');
         if(this.id == "lefttop"){
             aoptions = {width: "340px", height: "340px", backgroundColor: "#CCCCCC", left: '0', top: '0'}
         }else if(this.id == "righttop"){
             aoptions = {width: "340px", height: "340px", backgroundColor: "#CCCCCC", left: '-=190', top: '0'}
         }else if(this.id == "leftbottom"){
             aoptions = {width: "340px", height: "340px", backgroundColor: "#CCCCCC", left: '0', top: '-=190'}
         }else if(this.id == "rightbottom"){
             aoptions = {width: "340px", height: "340px", backgroundColor: "#CCCCCC", left: '-=190', top: '-=190'}
         }
         $(this).css('z-index' , '99').animate(aoptions, 800);
     }).mouseout(function(){
         if(this.id == "lefttop"){
             aoptions = {width: "150px",    height: "150px", backgroundColor: "#FFFFFF", left: '0', top: '0'}
         }else if(this.id == "righttop"){
             aoptions = {width: "150px",    height: "150px", backgroundColor: "#FFFFFF", left: '+=190'}
         }else if(this.id == "leftbottom"){
             aoptions = {width: "150px",    height: "150px", backgroundColor: "#FFFFFF", left: '0', top: '+=190'}
         }else if(this.id == "rightbottom"){
             aoptions = {width: "150px",    height: "150px", backgroundColor: "#FFFFFF", left: '+=190', top: '+=190'}
         }
         $(this).animate(aoptions, 800, function(){
             $(this).parent().css('z-index' , '2');
         });
     });
 });