JSFiddle - React, Tailwind, and code Playground

by igalst

HTML

<ul id="list"></ul>

CSS

.list {
    list-type: none;
}

.item {
    /*float: right;*/
    display: inline-block;
    width: 95px;
    overflow: hidden;
    margin: 2px;
    background: red;
}

JavaScript

var list = $('#list');

for (var i=0; i<15; i++) {
    var height = Math.floor(Math.random() * 100) + 10;
    var item = $('<li />').addClass('item')
                          .text(i)
                          .height(height)
                          ;//.css('top', -height / 2);
    list.append(item);
}