I tried to factorize the code to make it simple, readable, compact and easily usable. To overlay a text block only (without image), you must first hide the original text because the new image is not there to do so. When the mouse hovers, its opacity changes from 0 to 1 with a smooth transition to make it appear over the original div. hover, and “positioned” in absolute to occupy the entire surface of the container including original image and text (100% width and height).
0 Comments
Leave a Reply. |