alex-shpak / hugo-book

Hugo documentation theme as simple as plain book
https://hugo-book-demo.netlify.app
MIT License
3.21k stars 1.16k forks source link

Is there a way to show an image or text on mouseover? #584

Closed keithtangtw closed 2 months ago

keithtangtw commented 6 months ago

When displaying an image like this:

![](/Styles/image.png)

I would like to show another image (image2.png) or text on mouseover of the first image.png

How would I go about doing this?

alex-shpak commented 5 months ago

Hello! Unfortunately not out of the box, or not very fancy out of the box, you can set a attributetitle for an image in markdown ![Alt text can be put here](/Styles/image.png "Put title here") this will show Put title here after hovering over image for a bit of time. Optionally you can look for JS lib to turn title into popups