gpt4 book ai didi

javascript - css + html 菜单点击框

转载 作者:行者123 更新时间:2023-11-28 07:35:48 27 4
gpt4 key购买 nike

我使用不同的互联网资源编写了一些代码。我遇到了一个问题 -菜单底部的每个对象都无法与之交互。菜单会干扰下拉列表下方的所有内容。

<style>
body {
padding: 0;
margin: 0;
font-family: Arial;
font-size: 23px;
}
#nav {
background-color:1a1a1a;
opacity: 0.9;
}
#nav_wrapper {
width: 960px;
margin: 0 auto;
text-align: right;
}
#nav ul {
list-style-type: none;
padding: 0;
margin: 0;
position: relative;
min-width: 200px;
}
#nav ul li {
display: inline-block;
}
#nav ul li:hover {
background-color: #333;
}
#nav ul li a, visited {
color: #CCC;
display: block;
padding: 15px;
text-decoration: none;
}
#nav ul li:hover ul {
display: block;
}
#nav ul ul {
display: none;
position: absolute;
background-color: #333;
border: 0px solid #222;
border-top: 0;
margin-left: -5px;
}
#nav ul ul li {
display: block;
}
#nav ul ul li a:hover {
color: #699;
}
.left-to-right {
text-align: left;
}
</style>
<html lang="he">
<body dir-"rtl"><div id="nav">

<div id="nav_wrapper">
<div>
<ul <ul dir="RTL">

<li> <a href="#">תרמילים</a>

<ul class="left-to-right">
<!-- <li class="backpacks" id="firstlight-20l"> <a href="/products/firstlight-20l"> FirstLight 20L</a> </li>

<li class="backpacks" id="firstlight-30l"> <a href="/products/firstlight-30l"> FirstLight 30L</a> </li>

<li class="backpacks" id="firstlight-40l"> <a href="/products/firstlight-40l"> FirstLight 40L</a> </li>-->

<li class="backpacks"> <a href="/products/rotation180-professional-Deluxe"> rotation180° Professional 38L Deluxe</a> </li>

<li class="backpacks"> <a href="/products/rotation180-horizon"> rotation180° Horizon 34L</a> </li>

<li class="backpacks"> <a href="/products/rotation180-panorama"> rotation180° Panorama 22L</a> </li>

<!-- <li class="backpacks" id="rotation180-travel-away"> <a href="/products/rotation180-travel-away"> rotation180° Travel Away 22L</a> </li>-->

<li class="backpacks" id="rotation180-trail"> <a href="/products/rotation180-trail"> rotation180° Trail 16L</a> </li>

</ul>
</li>
<li> <a href="#">תיקי מצלמות ספורט</a>

<ul class="left-to-right">
<li><a href="#">GP 1 kit case</a>
</li>
<li><a href="#">GP 2 kit case</a>
</li>
</ul>
</li>
<li> <a href="#">אביזרים</a>

<ul class="left-to-right">
<li><a href="#">r180º Panorama/Horizon Photo Insert</a>
</li>

</ul>
</li>

</ul>
</div>
</div>
</div>
</body>
</html>

最佳答案

#nav_wrapper ul ul li{ text-align:left;}

您只需添加:demo

关于javascript - css + html 菜单点击框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31207137/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com