JSFiddle - React, Tailwind, and code Playground
by isherwood
HTML
<div class="outer">
<div class="inner">
<img src="http://placehold.it/500x500" alt="" />
<div class="content">Content is set to {position: absolute} so that it overlays the spreader image.</div>
</div>
</div>
CSS
.outer {
height: 150px;
margin: 20px;
background: #eee;
overflow: hidden;
}
.inner {
border-radius: 50%;
background: pink;
height: 100%;
display: inline-block;
position: relative;
}
.inner img {
max-height: 100%;
opacity: 0;
}
.content {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 10px;
}