<div class="box"></div>
.box {
  --size: 50px;
  --b: 10px;
  --p: 25px;
  
  height: 200px;
  margin: 10px 0;
  
  --_g: ;
  -webkit-mask:
    radial-gradient(55.9px at 50% calc(var(--size) + var(--p)),#0000 calc(99% - var(--b)),#000 calc(101% - var(--b)) 99%,#0000 101%) 
      calc(50% - 2*var(--size)) 0/calc(4*var(--size)) 100%,
    radial-gradient(55.9px at 50% calc(-1*var(--p)),#0000 calc(99% - var(--b)),#000 calc(101% - var(--b)) 99%,#0000 101%) 
      50% var(--size)/calc(4*var(--size)) 100% repeat-x;
  background:linear-gradient(90deg,red,blue);  
  border: none;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.