Shopify themes, liquid, logos, and UX
Hello All,
I am trying to add two different custom cursors to this website, both of which will be an image file.
Unfortunately, when adding my code in, with two different images and what I assume is two different cursor states (one for default and one for links), the cursor does not change when hovering over links, and just continues with the same cursor.
Please see the code below:
<style> html { pointer-events::none :url({{'https://cdn.shopify.com/s/files/1/1779/2423/files/Halloween_Broomstick.png?v=1696249673'}}), auto; } html *{ cursor: url({{'https://cdn.shopify.com/s/files/1/1779/2423/files/Christmas_Candy_Cane_Cursor.png?v=1697028426'}}), auto !important; } </style>
Would anyone know how to update the code so that two different cursors will be displayed, one for default and one for hovering links?
Please see the website below.
I highly appreciate any help!
Solved! Go to the solution
This is an accepted solution.
Hi @Toptoys2uHS
Try this:
<style>
html * {
cursor: url('https://cdn.shopify.com/s/files/1/1779/2423/files/Halloween_Broomstick.png?v=1696249673'), auto;
}
html a {
cursor: url('https://cdn.shopify.com/s/files/1/1779/2423/files/Christmas_Candy_Cane_Cursor.png?v=1697028426'), auto !important;
}
</style>
Hi @Toptoys2uHS
This is Mike from Omega
If you want to custom broomstick for default and Candy cane for link, you can try my CSS code
html * {
cursor: url('https://cdn.shopify.com/s/files/1/1779/2423/files/Halloween_Broomstick.png?v=1696249673'), auto;
}
html a {
cursor: url('https://cdn.shopify.com/s/files/1/1779/2423/files/Christmas_Candy_Cane_Cursor.png?v=1697028426'), auto;
}
Hope my answer will help you
Mike from Omega
Unfortunately, this code only seems to make the broomstick (default) work, while the links change back to a regular "hand" default cursor.
I added this into theme.liquid like so:
<style>
html * {
cursor: url('https://cdn.shopify.com/s/files/1/1779/2423/files/Halloween_Broomstick.png?v=1696249673'), auto;
}
html a {
cursor: url('https://cdn.shopify.com/s/files/1/1779/2423/files/Christmas_Candy_Cane_Cursor.png?v=1697028426'), auto;
}
</style>
Would this be better suited in a different asset?
This is an accepted solution.
Hi @Toptoys2uHS
Try this:
<style>
html * {
cursor: url('https://cdn.shopify.com/s/files/1/1779/2423/files/Halloween_Broomstick.png?v=1696249673'), auto;
}
html a {
cursor: url('https://cdn.shopify.com/s/files/1/1779/2423/files/Christmas_Candy_Cane_Cursor.png?v=1697028426'), auto !important;
}
</style>
This seems to work, thank you very much for your help!
This seems to work, and I can use it for specific areas of the site with some (if) statement code too!
Accepted as a solution and like given!
Thank you once again.
For anyone looking for this solution, the code is below - you only need to change the URLs to your own images - paste into Theme.Liquid
<style>
html * {
cursor: url('https://cdn.shopify.com/s/files/1/1779/2423/files/Halloween_Broomstick.png?v=1696249673'), auto;
}
html a {
cursor: url('https://cdn.shopify.com/s/files/1/1779/2423/files/Christmas_Candy_Cane_Cursor.png?v=1697028426'), auto !important;
}
</style>
Where To Paste This Code In Theme.Liquid
Where To PAste It????
@Emiway you can paste it before the closing head tag </head> on theme.liquid
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024