JSFiddle - React, Tailwind, and code Playground

HTML

<div class="block">
  <div class="d d1"></div>
  <div class="d d2"></div>
</div>

CSS

* {
  box-sizing: border-box
}
body {
  overflow-x: hidden;
}
.block {
  width: 300px;
   margin: 50px auto;
}
.d {
  position: relative;
  
  height: 200px;
 
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.3), rgba(255,255,255,0.3) 10px, transparent 10px, transparent 20px);
}
.d::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: 100vw;
  height: 100%;
  z-index: -1;
}
.d1::before{
  background: darkseagreen;
}
.d2::before {
  background: palevioletred;
}