<div>
    <ul class="nav">
        <li><a href="">导航一</a><span></span></li>
        <li><a href="">导航二</a><span></span></li>
        <li><a href="">导航三</a><span></span></li>
        <li><a href="">导航四</a><span></span></li>
    </ul>
</div>
<style>
    ul.nav {background-color: whitesmoke;}
    ul.nav li {padding: 10px 0;margin: 0 30px;overflow: hidden;display: inline-block;}
    ul.nav li a {text-decoration: none;}
    ul.nav li span {position: relative;left: -10%;float: left;width: 5%;transition: border, width .5s;border: 1px solid #5FB878;}
    ul.nav li:hover span {width: 105%;border: 1px solid #5FB878;}
</style>

演示: