JSFiddle - React, Tailwind, and code Playground

by cstigler

HTML

<div class="container">
</div>

CSS

.container {

}
.row {
    
}
.cell {
    display: inline-block;
    width: 1px;
    height: 1px;
    margin: 0;
}

JavaScript

var makeRandomColor = function() {
    return '#'+Math.floor(Math.random()*16777215).toString(16);
}

var cont = $('.container');
for (var i = 0; i < 512; i++) {
    var r = $('<div class="row">');
    cont.append(r);
    
    for (var j = 0; j < 512; j++) {
        var c = $('<div class="cell">');
        c.css('background-color', makeRandomColor());
    }
}