New Shopify Certification now available: Liquid Storefronts for Theme Developers

Custom cursor

Toptoys2uHS
Explorer
68 1 8

Hello All,

 

I am trying to update the cursor on the site to have two different cursors (one for the default state, and one for hovering over links), however when I implement the code, I only end up with one type of cursor image, which is currently the one for hover.

 

Here is the code:

 

<style>
html {
pointer-events::none :url({{'https://cur.cursors-4u.net/holidays/hol-5/hol424.cur'}}), auto;
}
html *{
cursor: url({{'https://cur.cursors-4u.net/holidays/hol-5/hol462.cur'}}), auto !important;
}
</style>

 

Would anyone be able to update this code to have the two different cursor available? One cursor for default use, and one appearing once hovering over a URL.

 

The website can be found here: https://toptoys2u.co.uk/

 

Appreciate any help!

Replies 5 (5)
PageFly-Oliver
Navigator
503 98 90

Hi @Toptoys2uHS ,

 

 I think you can use the code. example

<style>
html{
cursor:url(https://a.1stdibscdn.com/assets/images/global/cursors/magnifier.svg),url(https://a.1stdibscdn.com/assets/images/global/cursors/magnifier.png),url(https://a.1stdibscdn.com/assets/images/global/cursors/magnifier.cur),pointer;
}
</style>



Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

Toptoys2uHS
Explorer
68 1 8

Hello @PageFly-Oliver 

 

I  have copy and pasted the code into theme.liquid, unfortunately this did not work and it still only shows the one type of cursor as default, but once it is hovered over a link, it disappears and displays the default "hand" cursor.

Would I need to upload the image for the .cur to work?

PageFly-Oliver
Navigator
503 98 90

Can you share your URL so I can check it?

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

PageFly-Oliver
Navigator
503 98 90

Hi,

I think you can use two more formats: .cur and .svg. to use the same as my structure above

 

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.