JSFiddle - React, Tailwind, and code Playground

HTML

<html>
    <body>
        <div id="container">
        </div>
    </body>
</html>

CSS

body{
  background-color: #e2e2e2;
}

#container{
     width: 200px;   
}

JavaScript

var urls = new Array(
    'http://www.thecssawards.com/imagenes/ico-color1.png',
    'http://www.thecssawards.com/imagenes/ico-color2.png',
    'http://www.thecssawards.com/imagenes/ico-color3.png',
    'http://www.thecssawards.com/imagenes/ico-color4.png',
    'http://www.thecssawards.com/imagenes/ico-color5.png',
    'http://www.thecssawards.com/imagenes/ico-color6.png',
    'http://www.thecssawards.com/imagenes/ico-color7.png',
    'http://www.thecssawards.com/imagenes/ico-color8.png',
    'http://www.thecssawards.com/imagenes/ico-color9.png'
);



for (i = 0; i < urls.length; i++) {

    var img = new Image();
    $(img)
        .attr('src', urls[i])
        .attr('id', 'img' + i)
        .load(function(){
            $('#container').append( $(this) );
            // Your other custom code
    
            $(this).css( {
                "height": "50px",
                "width": "50px",
                "padding": "2px",
                "margin": "2px",
                "border": "1px solid #333"
            });    
       
        });        
}