JSFiddle - React, Tailwind, and code Playground
SuperImposing images on one another
by refhat
HTML
<p>Here is a product with transparent PNG overlayed</p>
<div class="container">
<img src="http://nontalk.s3.amazonaws.com/product.png"
width="100" height="100" />
<img src="http://nontalk.s3.amazonaws.com/overlay.png"
class="overlay" width="100" height="100" />
</div>
<p>Below is a product without the overlay</p>
<div class="container">
<img src="http://nontalk.s3.amazonaws.com/product.png"
width="100" height="100" />
</div>
CSS
.container {
position: relative;
}
.overlay {
position: absolute;
left:0;
top: 0;
z-index: 999;
}