JSFiddle - React, Tailwind, and code Playground

HTML

<div class="block">
  <div class="slider"></div>
  <div class="text">text</div>
</div>

CSS

* {
  box-sizing: border-box
}

html,
body {
  height: 100%;
  padding: 0;
  margin: 0;
}

.block {
  position: relative;
}
.slider {
  height: 200px;
  background: linear-gradient(45deg, rgba(0,17,0,0.3) 50%,rgba(0,200,0,0.3) 50%) center / 50px 50px;
}
.text {
  position: absolute;
  top: 40px;
  left: 100px;
  padding: 30px;
  background: #fff;
}