<div style="width:100px;">
<a href="#">ссылка с анимацией в две строки</a>
</div>
a {
    color: blue;
    text-decoration: none;
    
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: background-size .3s;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 5px 0;
  line-height: 30px;
}

a:hover, a:focus {
    background-size: 100% 1px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.