Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drag cursor in javascript?

I need to set the drag cursor in some places, but I can't see it listed here http://www.w3schools.com/cssref/pr_class_cursor.asp

In my case it appears when I drag some image :

The drag cursor http://s2.subirimagenes.com/otros/previo/thump_8236773bgform29.jpg

Is there a code to use like body{cursor: drag} ?

like image 969
fpilee Avatar asked Feb 17 '23 21:02

fpilee


1 Answers

You can use the move cursor paramater:

.target {cursor:move}

That cursor you are asking for is unique, if you want to use one with pure CSS then the best for this case is the move cursor.

Edit: For a custom cursor like the one you see, you can use the URL property value

.target{ cursor: url(mycursor.gif), auto; }

You want to specify a default cursor at the end just incase the one specified by the URL cannot be used.

If you want this cursor only to appear when they are dragging then you'll have to apply this CSS rule to the element being dragged when the user clicks on it.

like image 56
Chris Bier Avatar answered Feb 20 '23 09:02

Chris Bier