Html 禁止游标?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5904865/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 08:27:20  来源:igfitidea点击:

Forbidden cursor?

htmlcss

提问by Hailwood

I am looking for the name of the "forbidden/cancel" cursor.

我正在寻找“禁止/取消”光标的名称。

I can't seem to find it.

我好像找不到

回答by BoltClock

The values of cursorthat represent what you're looking for are not-allowedand no-drop. These values are new to CSS3, so if you need browser compatibility you should specify an image instead.

的值cursor代表您要查找的内容是not-allowedno-drop。这些值是 CSS3 的新值,因此如果您需要浏览器兼容性,则应改为指定图像。

回答by Leopold Gault

The css cursor: not-allowed;also works.

css cursor: not-allowed;也有效。

回答by Alireza Sabahi

here is complete sample:

这是完整的示例:

.not-allowed {
  cursor: not-allowed;
}
<input type="submit" value="not-allowed" class="not-allowed" disabled />