The challenge lies in the fact that the dimensions and position of the div box will be dynamically changing through JavaScript, while also requiring the box to remain completely transparent.
Refer to the image for a visual understanding of what I'm trying to achieve. From my knowledge, there doesn't seem to be a CSS-only solution, am I correct?
If you have any creative solutions or tricks that could assist me (excluding strategies involving four boxes around the perimeter or nested boxes), please share!