首页 > 其他分享 >4.28

4.28

时间:2023-04-02 20:56:02浏览次数:40  
标签:content dropdown 4.28 position 0px display

CSS下拉菜单

<style>
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  padding: 12px 16px;
}
.dropdown:hover .dropdown-content {
  display: block;
}
</style>
<div class="dropdown">
  <span>鼠标移动到我这!</span>
  <div class="dropdown-content">
    <p>菜鸟教程</p>
    <p>www.runoob.com</p>
  </div>
</div>

 

标签:content,dropdown,4.28,position,0px,display
From: https://www.cnblogs.com/yangkaiwen/p/17281325.html

相关文章