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 class="section top">dude</div>
<div class="section middle_left">dude</div>
<div class="section middle_right">dude</div>
<div class="section bottom">dude</div>
</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 class="section top">dude</div>
<div class="section middle_left">dude</div>
<div class="section middle_right">dude</div>
<div class="section bottom">dude</div>
</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 class="section top">dude</div>
<div class="section middle_left">dude</div>
<div class="section middle_right">dude</div>
<div class="section bottom">dude</div>
</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 class="section top">dude</div>
<div class="section middle_left">dude</div>
<div class="section middle_right">dude</div>
<div class="section bottom">dude</div>
</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;
}
.section {
height: 0;
position: relative;
text-align: center;
}
.top {
float: left;
width: 100%;
padding-bottom: 20%;
background-color: #5CB3FF;
}
.middle_right {
float: right;
width: 50%;
padding-bottom: 60%;
background-color: #ff9800;
}
.middle_left {
float: left;
width: 50%;
padding-bottom: 60%;
background-color: #b1d631;
}
.bottom {
float: left;
width: 100%;
padding-bottom: 20%;
background-color: yellow;
}
@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%; }
}