<分区>
标签 javascript html css
<分区>
第二个例子工作,手确实出现了,但为什么第一个 div
不工作?
div {
cursor: url('http://i.imgur.com/EuDeZWn.png'), auto;
}
span {
cursor: url('http://www.javascriptkit.com/dhtmltutors/cursor-hand.gif'), auto;
}
<div>
target
</div>
<br>
<br>
<span>
target 2
</span>
最佳答案
来自 MDN :
In Gecko (Firefox) the limit of the cursor size is 128×128px. Larger cursor images are ignored. However, you should limit yourself to the size 32×32 for maximum compatibility with operating systems and platforms.
您的图像是 237 x 173,明显更大。
关于javascript - 光标不能使用光标 url 工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38954223/