I am looking for a way to decrease the opacity and overlay text on a thumbnail image when it is hovered over. I have considered a few methods, but I am concerned that they may not be efficient or elegant.
- Creating a duplicated image in Photoshop with the text overlay and reduced opacity, then swapping out the original with the duplicate upon mouseover.
- Using CSS to lower the opacity on hover, along with Javascript to toggle the visibility of a div containing the overlay text.
The issue I see with option 1 is that it seems like a waste of space and bandwidth, potentially leading to slow loading times. As for option 2, it seems like I would need to hard-code the location of each div, making maintenance and updates difficult. Although this may be a general question, I am struggling to find a solution. How can I achieve this simple task in a way that allows for easy addition of new thumbnails?