I want to create an image gallery and if the user hovers over an image it should be set to none and the text below it should be shown. But I have to set the image like this
echo "<div class=textimage style=background-image:url(pictures/head_censored.png)>Sample text</div>";
Like this, the picture it shown but the hover effect (background-image: none) is not applied. If i declare the image in the css file it works but as the pictures are always changing this is way too complicated. Any ideas?
If you want to create something simple without making complicated javascript, a little css trick will do.
Wish you luck 🙂