2

Does anyone know a library that provides an interactive selection mechanism highlighting the element the user is currently hovering with their mouse?

I have created a test fiddle which demonstrates this mechanism.

If there is no existing library for this, I have the following issue with my own code: pointer-events: none is not supported in IE < 11 but I need a way of making the highlighting rectangle click-through.

Vincent
  • 2,342
  • 1
  • 17
  • 22

1 Answers1

0

You can do this using pure CSS, just by setting the background color with the :hover selector on any elements you want to be highlighted:

h1:hover, p:hover, li:hover
{
  background: rgba(127,127,127,0.5);
}

JSFiddle Example

Gabby Paolucci
  • 887
  • 8
  • 23