JSFiddle - React, Tailwind, and code Playground

HTML

<div id="outer">
    <div class="inner">One</div>
    <div class="inner">Two</div>
    <div class="inner">Three</div>
    <div class="inner">Four</div>
</div>

CSS

#outer {
    width: 600px;
    height: 600px;
    background-color: #eee;
    position: relative;
}
.inner {
    width: 100px;
    height: 100px;
    background-color: #ccc;
    border: 1px solid #aaa;
    position: absolute;
}

JavaScript

$('.inner').each(function(i) {
    $this = $(this);
    var bottomPos = ($this.outerHeight())*i;
    $this.css('bottom', bottomPos);
});