r/neocities • u/lullaby-0 • 15d ago
Question Need help with cursor
How do I add a custom cursor to my page? When I tried I couldn't get it to work. Pls help 😣🙏 I'm a total beginner with this thing.
3
Upvotes
2
u/Dakota-Batterlation https://perilune.space 14d ago
It can be a bit tricky (recently helped someone here troubleshoot cursors, as well as my own site). Please drop a link to your site so we can mess with it instead of playing telephone.
3
u/DeviantPost 15d ago
What does your code look like for trying to add the cursor? on my page it's: html { cursor: url('filename/cursorimage.png') auto; }.
Another thing is cursor images have to be 128 × 128px or smaller. An issue I ran into was that I didn't scale the png I used down properly, so make sure the image is actually 128 × 128 or smaller or it won't show up.
2
u/worksbeforedeath worksbeforedeath.neocities.org 12d ago
i am currently making custom cursors to sell & had to figure this out myself both for my own website & to add it the documents to sell.
https://kiunlo.neocities.org/cursor-tutorial is the tutorial i followed on how to create them.
as for adding it into css, you put the default/auto cursor into the body tag. you put the cursor used for links into the a:hover tag. you put the cursor used for text under p, h1, h2, h3, h4, h5, h6. for simplicity sake, i just put all of that into 1 tag on the top so it would be prioritized. i will warn, if you have any iframes or widgets on your site the cursor will not show on those, and that is completely normal & fine.