Это не разбор кода, просто макетик на тему
<!DOCTYPE html >
<html>
<head>
<title></title>
<style type="text/css">
.scroll
{ position:absolute;
top:0px;
left:0px;
height: 0px;
width: 0px;
z-index:0;
background-color:Blue;
-webkit-transition:all 0.5s ease;
-moz-transition:all 0.5s ease;
-o-transition:all 0.5s ease;
transition:all 0.5s ease;
}
#div1
{ position:absolute;
top:20px;
left:20px;
height:100px;
width:100px;
background-color:green;
}
#div2
{ position:absolute;
top:100px;
left:150px;
height:200px;
width:200px;
background-color:red;
}
#div3
{ position:absolute;
top:10px;
left:330px;
height:100px;
width:100px;
background-color:yellow;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript">
window.onload = function () {
$('.main').on('mouseover', function () {
$(".scroll").css({
top: (parseInt($(this).css('top')) - 5).toString() + 'px',
left: (parseInt($(this).css('left')) - 5).toString() + 'px',
height: (parseInt($(this).css('height')) + 10).toString() + 'px',
width: (parseInt($(this).css('width')) + 10).toString() + 'px'
});
});
}
</script>
</head>
<body>
<div class="scroll"></div>
<div class="main" id="div1"></div>
<div class="main" id="div2"></div>
<div class="main" id="div3"></div>
</body>
</html>