使用jQuery或只是简单的Javascript是否可以更改为自定义光标? [英] Using jQuery or just plain Javascript is it possible to change to a custom cursor?
问题描述
我知道可以使用jQuery来执行以下操作:
I know it is possible to use jQuery to do something like:
$('body').css('cursor','wait');
我想知道的是:是否可以将光标更改为自定义加载动画,例如作为一个简单的旋转器gif?
What I want to know is: is it possible to change the cursor to a custom loading animation, such as a simple 'spinner' gif?
非常感谢提前。
推荐答案
你只是在这里动态操纵CSS。请参阅规范 - URI可以接受。浏览器支持是可变的。我好几年没试过了,但是上次我做Internet Explorer时要求游标是.cur格式。
You are just manipulating CSS on the fly here. See the spec — URIs are acceptable. Browser support is variable. I haven't tried it in years, but last time I did Internet Explorer required the cursors to be in .cur format.
那说,虽然有可能,但是用户识别是一组很好的标准游标。您很少会有标准列表未涵盖的游标有效地表示的内容,并且该列表确实涵盖了应该使用的内容,因此用户无需学习新图标。
That said, while it is possible, there are a good set of standard cursors that users recognise. It is rare that you will have thing usefully represented by a cursor that isn't covered by the standard list, and when that list does cover things it should be used so users don't have to learn a new icon.
这篇关于使用jQuery或只是简单的Javascript是否可以更改为自定义光标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!