<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{ margin:0; padding: 0}
        ul{ list-style: none}
        #menu{ width: 100px; height: 30px; border: black 1px solid; margin: 20px auto; position: relative;
            text-align: center;line-height: 30px }
        #menu ul{ width: 100px;  border: black 1px solid; position: absolute; left: -1px; top: 30px;background-color: white;
            display: none;
        }
        p{ text-align: center}
        #menu:hover ul{ display: block}
        #menu ul li:hover{ background-color: antiquewhite}

    </style>
</head>
<body>
    <div id="menu">
        下拉菜单
        <ul>
            <li>列表1</li>
            <li>列表2</li>
            <li>列表3</li>
            <li>列表4</li>
            <li>列表5</li>
        </ul>
    </div>
<p>测试段落测试段落</p>
</body>
</html>