微极客

不忘初心
砥砺前行

张承艳看这儿

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <style type="text/css">
        *{
            margin: 0rem;
            padding: 0px;
        }
        .d{
        margin-top: 10px;
        padding: 10px;
        display: none;
        list-style: none;
        background-color: #55ffff;
        height:auto;
        width: 85px;
        list-style: none;
        position: absolute;
        
        }
        ul li:hover ul{
        display: block;
        border-radius: 20px;
        }
        ul li:hover{
            background-color: green;
            border-radius: 20px;
        }
        #ul{
            font-family:"宋体";
            margin: 100px;
            padding: 5px;
            list-style: none;
            background-color: #aaff7f;
            height: 20px;
            width: 170px;
            border-radius: 20px;
        }
        #ul li{
            float: left;
            padding-right: 10px;
        }
    </style>
</head>
<body>
    <ul id="ul">
    <li>一级
    <ul class="d">
    <li>二级</li>
    <li>二级</li>
    <li>二级</li>
    <li>二级</li>
    </ul>
    </li>
    <li>一级
    <ul class="d">
    <li>二级</li>
    <li>二级</li>
    <li>二级</li>
    <li>二级</li>
    </ul>
    </li>
    <li>一级
    <ul class="d">
    <li>二级</li>
    <li>二级</li>
    <li>二级</li>
    <li>二级</li>
    </ul>
    </li>
    <li>一级
    <ul class="d">
    <li>二级</li>
    <li>二级</li>
    <li>二级</li>
    <li>二级</li>
    </ul>
    </li>

    </ul>
</body>
</html>
本原创文章未经允许不得转载 | 当前页面:微极客 » 张承艳看这儿

评论

此文章无法评论