导航栏实现移入后弹出左右伸缩的过渡(css3)

<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/tongyong.css">
    <style>
        .nva li{
            float: left;
            margin-left: 20px;
            /* background-color: cornflowerblue; */
        }
        li a{
            color: black;
            /* background-color: blue; */
        }

        li span{
            width: 0;
            height: 3px;
            background-color: brown;
            display: block;
            margin: 3px auto;
            transition: 0.3s width;
        }

        li:hover span{
            width: 90%;
        }
    </style>
</head>

<body>
<div class="nva">
    <ul>
        <li><a href="#">导航栏<span></span></a></li>
        <li><a href="#">返回主页<span></span></a></li>
        <li><a href="#">登录<span></span></a></li>

    </ul>
</div>
</body>

</html>

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页