asp.net 悬停菜单项
当我将鼠标悬停在具有动态菜单的静态菜单项上时,悬停样式生效,但是一旦我开始导航动态菜单,静态菜单项就会返回非悬停样式。有谁知道如何让它们坚持下去,直到我停止“使用”该菜单?我尝试了“选定的”静态菜单项样式,但这不起作用 - 如果我使用它们,即使我停止导航菜单,最后选定的静态菜单项也会显示选定的样式 - 使用菜单后我希望样式恢复正常样式......
When I hover on a static menu item that has a dynamic menu, the hover styles are in effect but once I start navigating the dynamic menu the static menu item goes back to the non-hover styles. Does anyone know how to make them stick until I stop ''using' that menu? I tried the 'selected' static menu item styles but that doesn't work - if I use them, even when I stop navigating the menu the last selected static menu item will display the selected style - after using the menu I want the styles to revert to the normal styles....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
悬停基本上是 mouseover 和 mouseout 事件的封装,并且它绑定到一个元素。例如,如果您将菜单实现为有序列表,并为列表项实现了悬停,则每个元素都将具有与之关联的 mouseover 和 mouseout 事件。在您的情况下,无法使用悬停。我认为使用自定义逻辑会更好。
华泰
Hover is basically an encapsulation of mouseover and mouseout event and it is tied to one element. For instance if you have an implemented a menu as an ordered list and have implemented hover for list item then each and every element will have mouseover and mouseout event associated with it. In your case hover cannot be used. I think it would be better to use custom logic.
HTH