title: Animate rounded border lines on hover with CSS
body: <p>I'm trying to create a button hover animation where the border lines are animated. Does anyone know if its possible to animate the rounded corners with css or do I need to create an svg animation instead?
  See the codepen bellow:</p>
  
  See the Pen <a href="https://codepen.io/lipovskoy/pen/qJGXOx/" rel="nofollow noreferrer">Button Border Hover Effect</a> by Anton Lipovskoy (<a href="https://codepen.io/lipovskoy" rel="nofollow noreferrer">@lipovskoy</a>) on <a href="https://codepen.io" rel="nofollow noreferrer">CodePen</a>.</p>
  
  
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>@import url(https://fonts.googleapis.com/css?family=PT+Sans);
  *, *:after, *:before {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }
  body{
    font-family: 'PT Sans', sans-serif;
    display: table;
    width: 100%;
    background: #004b60;
  }
  .container{
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    height: 100vh;
  }
  button{
    display: inline-block;
    position: relative;
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    margin: 10px 20px;
    background: rgba(0, 210, 195, 1);
    border-radius: 0.175rem;
     -webkit-transition: all .5s ease-out;
    -moz-transition: all .5s ease-out;
    -o-transition: all .5s ease-out;
    transition: all .5s ease-out;
  }
  span{
    display: block;
    padding: 15px 20px;
  }
  button::before, button::after{
    content:"";
    width: 0;
    height: 1px;
    position: absolute;
    background: rgba(0, 210, 195, 1);
    border-radius: 0.175rem;
    transition: all 0.2s ease-out;
  }
  
  span::before, span::after{
    content:"";
    width:1px;
    height:0;
    position: absolute;
    background: rgba(0, 210, 195, 1);
    border-radius: 0.175rem;
      transition: all 0.2s ease-out;
  }
  button:hover::before, button:hover::after{
    width: 100%;
  }
  button:hover{
  background: rgba(0, 210, 195, 0.1);
    color:rgba(0, 210, 195, 1);
    }
  button:hover span::before, button:hover span::after{
    height: 100%;
  }
  
  /*----- button 4 -----*/
  .btn-4::after{
    right:0;
    bottom: 0;
    transition-duration: 0.4s;
  
  }
  .btn-4 span::after{
    right:0;
    bottom: 0;
    transition-duration: 0.2s;
  
  }
  .btn-4::before{
    left: 0;
    top: 0;
    transition-duration: 0.4s;
  
  }
  .btn-4 span::before{
    left: 0;
    top: 0;
    transition-duration: 0.2s;
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;button class="btn-4"&gt;&lt;span&gt;Hover Me&lt;/span&gt;&lt;/button&gt;
  &lt;/div&gt;
      </code></pre>
  </div>
  </div>
  </p>