I am Afshin, author of Intro.js. Let me introduce you to how this actually works.
In a focused / highlighted element, two separate things happened:
1) Create an auxiliary layer. The auxiliary layer is the white rounded corner layer in the focused element.
2) Change the z-index and position target element to bring the element to all other elements on the page.
If the position of the target element (the element that should be focused / selected):
Absolute / relative : IntroJs just sets the z-index target to 9999999 , so the target goes to the beginning of all the other elements on the page.
Static : Now IntroJs set the position of the target element to relative , and then set the z-index to 9999999 .
Now the target element is in front of all other elements of the page. So the last step remains, create an auxiliary element.
To create an auxiliary level, IntroJs simply gets the height, width, top and left parts of the target element, and then creates a div with the introJs-helperLayer (and absolute position) and adds it to the body .
Conclusion
To focus on an element, IntroJs takes two steps, first creating an auxiliary layer (a rounded corner layer on the page), and then creating the contents of the relative element to bring it to all elements on the page.
source share