视网膜显示屏上的SVG鼠标光标模糊 [英] SVG mouse cursor blurry on Retina display

查看:115
本文介绍了视网膜显示屏上的SVG鼠标光标模糊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网页上使用了自定义SVG光标,在Retina屏幕上似乎模糊了.这是常见问题吗?

I'm using a custom SVG cursor on my webpage and it appears to be blurry on Retina screens. Is this a common issue?

推荐答案

我遇到了同样的问题.我的解决方法涉及使用jQuery通过SVG div跟随鼠标位置:

I've run into the same issue. My workaround involves using jQuery to follow the mouse position with an SVG div:

$(document).mousemove(function(e){
$("#cursor").css({left:e.pageX, top:e.pageY});

但这有一个我自己尚未解决的问题-当您滚动时,它不会像css选项那样跟随鼠标的位置

but this has one issue of its own which I haven't resolved - it does not follow the mouse position as you scroll like the css option does

jQuery: https://jsfiddle.net/jhhbrook/ucuLefut/ CSS: https://jsfiddle.net/0chzmhrd/

jQuery: https://jsfiddle.net/jhhbrook/ucuLefut/ CSS: https://jsfiddle.net/0chzmhrd/

这篇关于视网膜显示屏上的SVG鼠标光标模糊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆