body {margin: 0;padding:0;} .box { position: relative; margin: 20px auto; border: 10px solid black; width: 150px; height: 150px; background-color: gold; } .radius { border-radius: 50px; } .outer-border:after { content: ""; position: absolute; top: 40px; right: 40px; bottom: 40px; left: 40px; border: 5px solid tomato; transition: all 0.2s ease-in; } .outer-border:hover:after { top: 0; right: 0; bottom: 0; left: 0; border-width: 0; border-color: transparent; }
<div class="box radius outer-border"></div>