JSFiddle - React, Tailwind, and code Playground
by Anton Fedoryan
HTML
<div class="abc">
</div>
CSS
body {
background-color: #0f0;
}
.abc {
width: 200px;
height: 50px;
border: 5px solid #000;
position: relative;
/*transition: width 0 ease-in-out 2s;*/
}
.abc::before,
.abc::after {
content: "";
display: block;
border: 5px solid #fff;
position: absolute;
transition-timing-function: ease-in-out;
transition-duration: 1.5s;
}
.abc::before {
left: -5px;
top: 50%;
right: -5px;
bottom: -5px;
border-top: none;
border-right: none;
}
.abc::after {
left: 50%;
top: -5px;
right: -5px;
bottom: -5px;
border-left: none;
border-bottom: none;
}
.abc:hover {
cursor: pointer;
}
.abc:hover::before {
/*top: 100%;
left: 100%;
border-left: none;*/
opacity: 0;
}
.abc:hover::after {
/*left: 100%;
bottom: 100%;*/
opacity: 0;
}