Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用纯 html 和 css 制作一个下拉菜单,但是当光标离开父 li 时子菜单消失,从而阻止我点击子菜单。这是测试站点的链接,链接文本
我真的很感激一些帮助。
罗兰 A.
问题是contentdiv 位于菜单上方并将鼠标悬停在菜单之外.. 设置ul为 haveposition:relative并且z-index:100它应该可以工作..
content
ul
position:relative
z-index:100
更新
实际上只是添加z-index:100;到#navigation规则中
z-index:100;
#navigation