JSFiddle - React, Tailwind, and code Playground

by bruno

HTML

<div class="container">
        <img class="circle" src="https://2ufl5g.blu.livefilestore.com/y1mgBBzqZLp8kDhb-O54HMb7jnwm-N-VZ3xEsE-MQu8Ky_K7XsfMnzI9eQeHiAVXia8oKjnxA9AGlOuZKlYXqjUrnk-sONGDjydSiFETUe37aQkYErlE1BiiA/circle.png?psid=1">
</div>
<div class="container">
        <img class="circle" src="https://2ufl5g.blu.livefilestore.com/y1mgBBzqZLp8kDhb-O54HMb7jnwm-N-VZ3xEsE-MQu8Ky_K7XsfMnzI9eQeHiAVXia8oKjnxA9AGlOuZKlYXqjUrnk-sONGDjydSiFETUe37aQkYErlE1BiiA/circle.png?psid=1">
</div>
<div class="container">
        <img class="circle" src="https://2ufl5g.blu.livefilestore.com/y1mgBBzqZLp8kDhb-O54HMb7jnwm-N-VZ3xEsE-MQu8Ky_K7XsfMnzI9eQeHiAVXia8oKjnxA9AGlOuZKlYXqjUrnk-sONGDjydSiFETUe37aQkYErlE1BiiA/circle.png?psid=1">
</div>
<div class="container">
        <img class="circle" src="https://2ufl5g.blu.livefilestore.com/y1mgBBzqZLp8kDhb-O54HMb7jnwm-N-VZ3xEsE-MQu8Ky_K7XsfMnzI9eQeHiAVXia8oKjnxA9AGlOuZKlYXqjUrnk-sONGDjydSiFETUe37aQkYErlE1BiiA/circle.png?psid=1">
</div>

CSS

.container {
    position: relative;
    float: left;
    width: 50%;
    height: 0;
    padding-bottom: 50%;
    background-color: #bbb;

}

.circle { 
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    height: auto;
    z-index: 1;
}

@media (max-width: 320px) {
    .container { width: 100%; padding-bottom: 100%; }
}

@media (min-width: 321px) and (max-width: 800px) {
    .container { width: 50%; padding-bottom: 50%; }
}

@media (min-width: 801px) {
    .container { width: 25%; padding-bottom: 25%; }
}