HTML 导航栏下拉菜单栏目

CSS

html,body {
	font-size: 12px;
}
.dropbtn {
    border: none;
    cursor: pointer;
    background: transparent;
}
a.nav-link-sk {
    font-size: 12px;}
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    width: 98px;

}
.dropdown-content a {
    padding: 5px 8px;
    text-decoration: none;
    display: block;
    background: transparent;
}
.dropdown:hover .dropdown-content {
    display: block;
}

DIV

<div class="dropdown">
<a class="nav-link" href="#####">
  <span class="dropbtn"> 科技公司</span>
  <div class="dropdown-content">
    <a class="nav-link-sk" href="/go/polycom"> 苹果</a>
    <a class="nav-link-sk" href="/go/spss"> 谷歌</a>
    <a class="nav-link-sk" href="/go/chguserpwd"> 微软</a>
  </div>
</a>
</div>

0 条评论

昵称

沙发空缺中,还不快抢~