JSFiddle - React, Tailwind, and code Playground

HTML

<div class="main">
  <i class="border-bot"></i>
</div>

CSS

.main{
  background-color: #777;
  margin: 50px auto;
  width: 100px;
  height: 100px;
  position: relative;
  z-index: 1;
}

.main::before{
  display: block;
  content: '';
  position: absolute;
  border: 2px solid red;
  border-right-color: transparent;
  border-bottom-color: transparent;
  width: 30px;
  height: 30px;
  top: 0;
  left: 0;
  z-index: 2;
}

.main::after{
  display: block;
  content: '';
  position: absolute;
  border: 2px solid red;
  border-left-color: transparent;
  border-bottom-color: transparent;
  width: 30px;
  height: 30px;
  top: 0;
  right: 0;
  z-index: 2;
}
i.border-bot::before{
  display: block;
  content: '';
  position: absolute;
  border: 2px solid red;
  border-right-color: transparent;
  border-top-color: transparent;
  width: 30px;
  height: 30px;
  bottom: 0;
  left: 0;
  z-index: 2;
}
i.border-bot::after{
  display: block;
  content: '';
  position: absolute;
  border: 2px solid red;
  border-left-color: transparent;
  border-top-color: transparent;
  width: 30px;
  height: 30px;
  bottom: 0;
  right: 0;
  z-index: 2;
}