Issue
I want to create custom cursor image, but it is limited to 32x32, while I need about 300x300 image. So it seems that I need to hide cursor cursor: none
and create custom large div or image, that will be moving with invisible mouse.
The simplest implementation could be:
$(document).on('mousemove', function(e){
$('#custom-cursor').css({
left: e.pageX,
top: e.pageY
});
});
but I have some problems:
- Performance (how should I implement moving div not with left-top properties)
- Text selection jsfiddle cannot select text properly
Can anyone help me with this?
Solution
On modern browsers, you need to use pointer-event
CSS property set to none
:
$(document).on('mousemove', function (e) {
$('#custom-cursor').css({
left: e.pageX,
top: e.pageY,
pointerEvents: 'none'
});
});
Answered By - A. Wolff
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.