Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS custom cursor with retina support

I can't find any information about this topic. I want a simple custom cursor with CSS. I have this code right now:

cursor: url('img/cursor_left.png'), auto;

It shows the cursor, nothing wrong. But it's blurry, because it isn't compatible for retina display. Anyone knows how to fix this?

Thanks, Angelo.

like image 834
Angelo A Avatar asked Mar 22 '13 18:03

Angelo A


1 Answers

I haven't tested this, but it should be possible to use image-set:

cursor: url('img/cursor_left.png'), auto;
cursor: -webkit-image-set(
  url('img/cursor_left.png') 1x,
  url('img/cursor_left_hi.png') 2x
), auto;
like image 84
Russell Zahniser Avatar answered Oct 22 '22 22:10

Russell Zahniser