Yep, CSS! You can use your browser's inspector to see exactly how it was done, the .screenshot class and the associated .screenshot:hover are the two places to look.
https://itch.io/docs/creators/css-guide
Thank you very much! I had no idea you're allowed to do this on a Itch.io page 😅