web前端,鼠标放上去出现下拉框html+css



<html>

<head>
    <meta charset="utf-8">
    <style type="text/css">
        dl{
           width: 100px;
           display: none;
           margin-top: -20px;
           text-align: center;
       }
        dl dt{
           border-bottom: solid #000 1px;
            padding: 5px;
        }
        div:hover dl{
           display: block;
           background-color: #59cde2;
       }
        a{
            text-decoration: none;
            padding: 5px;
        }
    </style>
</head>


<body>


<div>
    <h2>显示内容</h2>
    <dl>
        <dt><a href="http://www.baidu.com">淘宝</a></dt>
        <dt><a href="http://www.baidu.com">百度</a></dt>
        <dt><a href="http://www.baidu.com">QQ</a></dt>
    </dl>


</div>
</body>
</html>

版权声明:本文为zhaihaohao1原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。