我目前正在开设一个网站,我的下拉菜单有问题。当我将鼠标放在菜单上时,它不会显示子导航。 这是我的main_nav代码:
<input type="text"
value.bind="val | myFormat & updateTrigger:'blur':'paste'"
class="form-control"
blur.trigger="myOnBlur()">
这是我的下拉列表:
.column {
display: inline-block;
vertical-align: top;
font-size: 14px;
line-height: 1.2;
}
#main_navigation {
display: inline-block;
list-style-type: none;
margin: auto;
padding: 0;
overflow: hidden;
border: 1px solid #e7e7e7;
background-color: #f3f3f3;
text-align:center;
margin: auto;
}
#main_navigation li {
margin-top: 12px;
font-size: 15px;
line-height: 17px;
color: #333;
letter-spacing: 0px;
font-family: 'Crimson Text'
font-weight: normal;
display:inline-block;
position: relative;
}
#main_navigation li a {
display: block;
color: #666;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
这是HTML :(这个网站通过使用标签而不是自己输入所有列表更容易)
.dropbtn {
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.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);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
background-color: #f1f1f1;
}
.dropdown:hover .dropdown-content {
display: block;
}
这里还是新手&gt;&lt;但我一直在努力,仍然无法做到。请帮助!