If you do not want to use a custom cursor image, you can use JavaScript. Here is an example with jQuery
$(function() {
$(document).mousemove(function(e) {
var iconPosition = {
top: e.pageY + 12,
left: e.pageX + 12
};
$('.cursor-icon').offset(iconPosition);
});
});
.cursor-icon {
z-index: 1000;
color: red;
font-size: 2em;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<span class="cursor-icon"><i class="fa fa-heart" aria-hidden="true"></i></span>
Run codeHide result source
share