JSFiddle - React, Tailwind, and code Playground

by AJIEKCEU

HTML

<div class="items">
    <div class="item"></div>
</div>

CSS

.item{
  width: 350px;
  height: 150px;
  float: left;
  background-color: #000;
  position: relative;
}
.item:before,.item:after {
    content: ' ';
    position: absolute;
    left: 15px;
    top: 15px;
    right: 15px;
    bottom: 15px;
    z-index: 2;
    display: block;
    transition: all .5s ease 0s
}

.item:before {
    right: 100%;
    bottom: 100%;
    border-top: 1px solid transparent;
    border-left: 1px solid transparent;
}

.item:after {
    left: 100%;
    top: 100%;
    border-bottom: 1px solid #fff;
    border-right: 1px solid #fff;
}

.item:hover:before {
    right: 15px;
    bottom: 15px;
    border-color: #fff;
}

.item:hover:after {
    left: 15px;
    top: 15px;
    border-color: #fff
}