This page说 IE9 和 Opera 11.6 支持 Windows 上的上下文菜单光标,但我知道 Chrome、Safari 和 Firefox 不支持 Windows 上的上下文菜单光标,它只是在这些浏览器中显示常规箭头。
我简直无法理解为什么他们不支持该游标。它会非常有用,尤其是当它在 Mac 上的那些浏览器中受支持时。
它的用途是当您想让用户知道您已经在某个元素上放置了一个特殊功能时,当您在该元素上使用上下文菜单触发器时,该功能将被激活。对于 Windows,这是右键单击。 (最有可能调出自定义上下文菜单)
显然,Web 上的所有内容都有上下文菜单,您可以右键单击页面上的任意位置,然后会出现通用上下文菜单。不过,此光标适用于当您将自己的特殊功能放在将通过右键单击激活的元素时(以及任何 Mac 拥有的 - 上下文菜单键?)
有谁知道为什么这三种浏览器在 Windows 上不支持,但在这三种浏览器中它在 Mac 上支持?
最佳答案
关于"CSS cursor" page在 Mozilla 开发者网络中,您可以看到:
A context menu is available under the cursor. In Gecko/Firefox not implemented on Windows, bug 258960 WONTFIX.
On this page您可以阅读有关该错误的更多信息,例如:
In native Windows applications, the cursor for areas with a shortcut menu has always been identical to the normal cursor. Using a custom cursor will achieve little apart from annoying people with a non-default normal cursor.
关于css - 为什么 Windows 上的 safari、chrome 或 firefox 不支持 `cursor:context-menu`?但它是通过IE9和Opera吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9363711/