JSFiddle - React, Tailwind, and code Playground
by Abdul Ahmad
HTML
<div class='input-box'>
<input type='text'/>
<div class='background'>
</div>
</div>
CSS
body {
background: white;
}
.input-box {
position: relative;
display: inline-block;
padding: 5px 10px;
}
input {
border: none;
color: white;
outline: none;
background-color: transparent;
}
.input-box .background {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: teal;
opacity: 0.5;
z-index: -1;
}