使用CSS为鼠标光标指定颜色 [英] assign color to mouse cursor using CSS
本文介绍了使用CSS为鼠标光标指定颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在网页中为鼠标光标指定颜色?
How can I assign color to the mouse cursor in a web-page?
任何人都可以使用任何技术HTML,CSS,JavaScript?
Can anyone suggest me a way to do it using any of the technologies e.g. HTML, CSS, JavaScript?
推荐答案
与CSS一起使用图片 cursor
属性,我没有看到任何需要JavaScript heere ...
Use an image along with CSS cursor
property, I don't see any need of JavaScript heere...
div {
cursor: url(YOUR_IMAGE_URL), auto;
}
ve使用 auto
这只是默认光标
,只是因为你的图片无法加载,就像我们声明多个字体家庭。
As commented, I've used auto
which is nothing but default cursor
just incase your image fails to load, exactly like we declare multiple font families.
这篇关于使用CSS为鼠标光标指定颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文