Идея с этим решением состоит в том, чтобы захватить событие Mouseover, найти, какой элемент закончился мышь, и вставьте дивизион, который является полупрозрачным внутри, заполняет тот же размер, а затем удалите его после < /p>
var overlay = $('',{id: "8b29f35f-6cc6"});
$(overlay).css(({
position: 'absolute',
display:'block',
width: '100%',
height: '100%',
top: '0',
left: '0',
right: '0',
bottom: '0',
background: 'rgba(55,22,124,0.5)',
zindex: '1000000',
cursor: 'pointer'}));
var CurrentItem;
$('body').mousemove(function(evt){
CurrentItem = evt.target
});
< /code>
selecting = setInterval(function(){
$("#8b29f35f-6cc6").remove();
currentElement = CurrentItem;
$(currentElement).append(overlay);
}, 100);
< /code>
However with this approach lots of elements aren't getting the overlay and often with sites like for example stack overflow the overlay is just

going straight over most of the content and not smaller individual DOM elements. as shown below, you cant really see because the mouse isn't shown but basically its always going for much bigger DOM elements over the small ones I'm actually moused over
Подробнее здесь: https://stackoverflow.com/questions/610 ... move-event
Мобильная версия