JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container"></div>
CSS
.container {
position: relative;
height: 200px;
max-width: 500px;
margin: 0 auto;
background-color: rgba(0, 0, 0, 0.4);
}
.container::after {
content: '';
position: absolute;
top: 0;
left: 0;
z-index: -1;
width: calc(50% + 50vw);
height: 100%;
background: url('http://lorempixel.com/1000/200') no-repeat;
background-size: cover;
}
html {
box-sizing: border-box;
}
*, *::before, *::after {
box-sizing: inherit;
}
body {
margin: 0;
}