html 菜单点开有个下拉菜单怎么实现

如题所述

html lang="en"><head>
<meta charset="UTF-8">
<title>下拉菜单</title>
<style type="text/css">

.bt{
width: 50px;height: 28px;
border: 1px solid #ddd;
background-color: #eee;
font:12px "宋体";
}
.ct{
display: none;}

.dt{
height: 30px;
margin-top: 0px;
border: 1px solid #ddd;
background-color: white;
padding:auto 10px;
}

.dt1{
height: 30px;
margin-top: 1px;
border: 1px solid #ddd;
background-color: white;
padding:auto 10px;}

.dt:hover,.dt1:hover{background-color: #ddd;}
.bt:hover{background-color: green;}
.at:hover .ct{display: inline-block;}

</style></head><body><div class="at">
<div>
<button class="bt" type="button" >按钮</button>
</div>
<div class="ct" >
<div class="dt1">下拉菜单</div>
<div class="dt">下拉菜单</div>
<div class="dt">下拉菜单</div>
<div class="dt">下拉菜单</div>
</div>
</div> </div> </body></html>
温馨提示:答案为网友推荐,仅供参考
第1个回答  2016-08-26
那是js,html是做文本的
相似回答