2022-08-15T01:51:03.png

css

<style>
  
   *{

margin: 0;
padding: 0;
text-decoration: none;
list-style: none;

   }
   


.dropdox{

width: 120px;
 margin-left: 0;  
 position: fixed;  
 top: 0; 
 left: 1%; 

}


.dropdox:hover .droplist{

display: block;


}
   


.dropbt{

width: 120px;
height: 40px;
background: #369;


text-align: center;
line-height: 40px;

color: #fff;

cursor: pointer;

}


.droplist{

box-shadow: 0 1px 2px #222;
display: none;
}


.droplist li{

height: 40px;
text-align: center;
line-height: 40px;
background: white;

}

.droplist a:hover{

background: #ccc;


}
.droplist a{

display: block;
color: #000;


}

   </style>

html

<div class="dropdox" >

<div class="dropbt" >下拉菜单</div>
<ul class="droplist">


  <li><a  href="#" >链接</a></li>


  <li><a  href="#" >链接</a></li>


  <li><a  href="#" >链接</a></li>



  <li><a  href="#" >链接</a></li>


</ul>

</div>