JSFiddle - React, Tailwind, and code Playground
HTML
<div class="left"></div>
<div class="right"></div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
CSS
.left {
width: 100px;
height: 100px;
background-color: #f99;
position: absolute;
right: 43%;
bottom: 0;
}
.right {
width: 100px;
height: 100px;
background-color: #9f9;
position: absolute;
left: 40%;
bottom: 0;
}
JavaScript
$(window).scroll(function (event) {
var y = $(this).scrollTop();
$('div').html(y);
$('.left').css('marginRight', y/1);
$('.right').css('marginLeft', y/1);
});