I was wondering if custom cursor can be made from glyphicon. one way i can think of is to make cursor property none over body. Set the glyphicon z-index to top most with absolute positioning based on jquery mousemove x,y coordinates. is this the right way or is there any native methods ?
Although i did not find the native way to do this. But here's how i did it with jquery and css property.
#test{
width:200px;
height:200px;
cursor:none;
background-color:#ff0000;
}
#mycur{
position:absolute;
z-index:1000;
cursor:none;
}
$("#test").mousemove(function(e){
mycur=$("#mycur");
mycur.css("left",e.offsetX);
mycur.css("top",e.offsetY);
});
<div id="test">
</div>
<i id="mycur" class="fa fa-paint-brush"></i>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With