CSS Custom Cursor Issue
-
Hey everybody,
on my website I want to use a custom cursor (small illustration) and another custom one for the mouseover effect. The problem is, if I use .png (1x and 2x for retina), the cursor image is sharp but I am unable to set the hotspot coordinates to the center. No matter what coordinates I type in, the center stays in the top left corner of the cursor and it sort of "jumps" everytime it hovers over a link.body { cursor: url(http://test.de/image1.png) 35 35, auto; cursor: -webkit-image-set (url(http://test.de/image1.png) 1x, url(http://test.de/image1.png) 2x ), auto; } a { cursor: url(http://test.de/image2.png) 30 30, auto !important; cursor: -webkit-image-set (url(http://test.de/image2.png) 1x, url(http://test.de/image2.png) 2x ), auto !important; }If I use .svg, the hotspot coordinates are in the center but the cursor image appears blurry although the .svg contains fixed width and height (not responsive).
body { cursor: url(http://test.de/image1.svg) 35 35, auto; } a { cursor: url(http://test.de/image2.svg) 30 30, auto !important; }Does anyone know how to fix this?
-
-
Hi @mariusjopen
Sure, here you go http://test.girlpunk.de/
Thanks! -
-
Dear @Karolina
in my Chrome it works.Mhm…
Yes, nothing we can do about the retina.Otherwise use a jQuery which makes an image to follow your cursor.
Best!
Marius
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login