gpt4 book ai didi

html - CSS 自定义光标不起作用,浏览器不再支持它了吗?

转载 作者:太空宇宙 更新时间:2023-11-04 03:56:29 25 4
gpt4 key购买 nike

 body {cursor: url(cursor/NB_Arrow.cur);}

在样式表中

这行代码是我在所有其他 stackoverflow 答案中看到的如何执行的代码,但它似乎不起作用。我的光标与正常的默认箭头光标保持相同。

难道现在浏览器不再支持了还是我的代码打错了

在 IE 上试过了,最新的 Chrome 和最新的 Firefox 都不行

最佳答案

MDN 中所述:

Syntax

This means that zero or more URLs may be specified (comma-separated), which must be followed by one of the keywords defined in the CSS specification, such as auto or pointer.

所以尝试使用:

body {
cursor: url(cursor/NB_Arrow.cur), auto;
}

关于html - CSS 自定义光标不起作用,浏览器不再支持它了吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22731158/

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