Is it possible to change the opacity of the background, but only under the cursor area (for example, a white small circle)? I think of it a bit like a basic heatmap, but there is no heat left - it just follows the cursor.
I currently have
HTML:
html { background-color: #000; width: 100%; height: 100%; }
JS:
$(document).mousemove(function(event){ var i = event.pageX.toPrecision(1) / 1000; $("html").css('opacity', i) });
Sorry, this is probably a very simple starting point. Do I need to use canvas?
javascript html css mouseevent
xylar
source share