-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
width: 100%;
height: 100%;
object-fit: cover; или object-fit: contain;
const blocks = document.getElementsByClassName('block');
const stats = [];
for(block of blocks) {
const size = block.getElementsByClassName('item').length;
stats.push(size);
}
alert(stats);