JSFiddle - React, Tailwind, and code Playground

by blineberry

HTML

<div id="graphic">lorem ipsum</div>

CSS

#graphic {
    width: 200px;
    height: 100px;
    position: relative;
}
#graphic:before {
    content: '';
    
    position: absolute;
    width: 200px;
    height: 50px;
    z-index: -1;
    
    background-image: url(http://placehold.it/500x500/); /* Image is 500px by 500px, but only 200px by 50px is showing. */
}