Jump to content
Search Community

Draggable custom cursor

G. Scott test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Is there any way to use a url value for the cursor property? Trying to use a custom image for the cursor and this doesn't work:
cursor: "url(images/image.png) auto"


I am able to achieve in the HTML by adding as a style to the div. But Draggable overwrites the style. Maybe there's a way to stop that from happening? 



Link to comment
Share on other sites

Glad you found the solution.


For full cross-browser support: try this:

Cross Browser CSS cursor defined as a list containing:
1) the url relative to the source element,
2) the url relative to the style sheet,
3) and the default value.
        cursor: url(cursor.cur),url(cursor/cursor.cur),default;

The second url for cursor url(cursor/cursor.cur) is for IE. This is because in IE, for style sheets, the base URI is that of the source element, not that of the style sheet. Which is opposite to W3C specifications, but that is Microsoft IE for you.. always has to be different.


Keep in mind that default can also be set to auto.


Hope this helps? :)

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...