Last active
November 1, 2023 11:45
-
-
Save dsdsdsdsdsds/bd142334efcd81f0b30e to your computer and use it in GitHub Desktop.
CSS: Cross Browser hires/retina cursor image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.cursor { | |
cursor: url("cursor.png") 0 0, pointer; /* Legacy */ | |
cursor: url("cursor.svg") 0 0, pointer; /* FF */ | |
cursor: -webkit-image-set(url("cursor.png") 1x, url("[email protected]") 2x) 0 0, pointer; /* Webkit */ | |
} |
If you are using SVG be sure to set fixed height and width on SVG root node (recommended 32x32). Ref https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property
@pugson, that's nothing compared to my 3 hours :'(
Thank you
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
im trying to solve the same issue, but still looking pixelated on FireFox