在javascript中拖动光标?

Fel*_*les 4 html javascript css events cursor

我需要在某些地方设置拖动光标,但我可以'看到这里听过http://www.w3schools.com/cssref/pr_class_cursor.asp

在我的情况下,当我拖动一些图像时它会出现:

拖动光标http://s2.subirimagenes.com/otros/previo/thump_8236773bgform29.jpg http://s2.subirimagenes.com/otros/previo/thump_8236773bgform29.jpg

是否有像{body:drag}一样使用的代码?

Chr*_*ier 5

您可以使用移动光标参数:

.target {cursor:move}
Run Code Online (Sandbox Code Playgroud)

您要求的光标是唯一的,如果您想使用纯CSS,那么最好的情况是移动光标.

编辑: 对于您看到的自定义光标,您可以使用URL属性值

.target{ cursor: url(mycursor.gif), auto; }
Run Code Online (Sandbox Code Playgroud)

您希望在结尾处指定默认光标,只是因为URL指定的光标无法使用.

如果您希望此光标仅在拖动时显示,则您必须将此CSS规则应用于用户单击时拖动的元素.