cheesymacaroni Posted December 30, 2023 Share Posted December 30, 2023 Hello! I'm trying to upload a custom cursor to my site. I'm exporting the image from Figma. When I upload one that's 30x30 (exported normally), it's super pixelated. When I upload one that's 30x30 (exported with 4x), it just doesn't work. I'm guessing it's because the image might be too big? The image is a simple circle, so I'm not sure why it's coming out pixelated. Any help would be appreciated, thank you! Link to comment
cheesymacaroni Posted December 30, 2023 Author Share Posted December 30, 2023 Here's the code I'm using: body { margin: 0; height: 100vh; cursor: url(https://static1.squarespace.com/static/64bdf71a6c7d8b6e3c802b1b/t/658f6c9171c3500ca0998875/1703898257479/Ellipse+3413.png), auto; } Link to comment
tuanphan Posted January 1 Share Posted January 1 You try using svg file Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
cheesymacaroni Posted January 1 Author Share Posted January 1 It won't let me upload an svg 😞 How do I get the link? Link to comment
Solution tuanphan Posted January 2 Solution Share Posted January 2 You can follow this to upload file: https://support.squarespace.com/hc/en-us/articles/205813928-Uploading-and-managing-files Suppose the file name is: cursor.svg Your site is: chees.squarespace.com The file url will be: https://chees.squarespace.com/s/cursor.svg Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
cheesymacaroni Posted January 3 Author Share Posted January 3 Thank you for your help, tuanphan!! Really appreciate it 🙂 However, I'm running into another error 😞 I want to make my SVG cursor a small circle, but no matter what size I make it, it always defaults back to 30x30px. Here's what it looks like when I export it as 10x10, and here's what it loos like when I export it as 30x30. It's the same! I tried putting a transparent circle behind and making the actual orange circle smaller, but it still doesn't work. Any help would be very appreciated, thank you! Link to comment
cheesymacaroni Posted January 3 Author Share Posted January 3 Jk it worked - thank you so much! tuanphan 1 Link to comment
pdaultdesign Posted February 5 Share Posted February 5 @tuanphan This doesn't seem to work for me. I'm trying to add the svg file to the hover effect. Here's the code that I'm using. Any advice? body { margin: 0; height: 100vh; } a:hover{ cursor: url(https://mouse-giraffe-2zm7.squarespace.com/s/custom-cursor.svg), auto; } Link to comment
tuanphan Posted February 7 Share Posted February 7 On 2/5/2024 at 9:27 PM, pdaultdesign said: @tuanphan This doesn't seem to work for me. I'm trying to add the svg file to the hover effect. Here's the code that I'm using. Any advice? body { margin: 0; height: 100vh; } a:hover{ cursor: url(https://mouse-giraffe-2zm7.squarespace.com/s/custom-cursor.svg), auto; } What is your site url? I can test this code easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
pdaultdesign Posted February 10 Share Posted February 10 Thanks @tuanphan, the site URL is https://mouse-giraffe-2zm7.squarespace.com Password is grapevine Link to comment
pdaultdesign Posted February 12 Share Posted February 12 @tuanphan Any idea how to solve this one? Link to comment
pdaultdesign Posted February 13 Share Posted February 13 (edited) Hi there, does anyone know what CSS I would use to add a .svg file as a custom cursor? I've tried this code but it doesn't work: body { margin: 0; height: 100vh; cursor: url(https://mouse-giraffe-2zm7.squarespace.com/s/custom-cursor.svg), auto; } I've uploaded the file to Squarespace with the file name being 'custom-cursor.svg' Any help is greatly appreciated! Site URL is https://mouse-giraffe-2zm7.squarespace.com Password: grapevine Edited February 13 by pdaultdesign Link to comment
colin.irwin Posted February 13 Share Posted February 13 Delete your cursor {} rule for the body and use the following instead html { cursor: url(https://mouse-giraffe-2zm7.squarespace.com/s/custom-cursor.svg), pointer; } I'm Colin Irwin aka silvabokis. I've been a Squarespace designer & developer since 2013. I remember when it was all wild prairies round these here parts. 🐃🤠 Advice I give on here is free, though I may sometimes post an affiliate link or promote something I've written. That reminds me.. ..you might want to check out my Squarespace template finder or have a look at my other Squarespace tips Speaking of tips, 💲I've got a tip jar that you're welcome to throw a few quid into if you think I've helped you. If you're looking for a Squarespace developer Book a chat or Drop me a line - first meeting is always free Link to comment
pdaultdesign Posted February 13 Share Posted February 13 @colin.irwin I'm afraid that didn't work. Nothing happens. Any other ideas? Link to comment
pdaultdesign Posted February 13 Share Posted February 13 Nevermind @colin.irwinI got it. I never tried a PNG larger than 30px because I read that it wouldn't work, but it does. Here's the code I used: a:hover{ cursor: url(https://static1.squarespace.com/static/6593030a39067977655d1eca/t/65cbbba78e440d1ff8b1f66c/1707850663451/custom-cursor-70.png), auto; } Anyone who's looking to do it can just put this code in Custom CSS section and replace the URL with a file that they upload. Link to comment
pdaultdesign Posted February 13 Share Posted February 13 Got it! PNG file larger than 30px does in fact work. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment