I am new to JavaScript, so please bear with me if this question seems quite simple. I am facing an issue with my current task.
There is an image on a web page.
My goal is to place a black box on top of the image (using CSS) to cover it up.
Then, with the help of JavaScript, when the mouse hovers over the black CSS box, it should gradually fade out and reveal the underlying image.
I have managed to figure out how to create the fade effect using JavaScript, but the challenge lies in positioning a CSS box above the image...
If you could provide some guidance on achieving this, I would greatly appreciate it.
In my attempts so far, I created a CSS box and then added an image to the webpage, but unfortunately, the image ended up covering the CSS box instead.