I don’t usually write anything concerning web technology, for they become obsolete quickly, but this one is worth sharing. I first saw this example on T, but failed to figure it out how it’s done after attempting for a while.

Then, I saw the explanation from @sbartholomew:

the image is actually transparent in places and has elements that are hidden by the white background when it popups on a black background, different parts show - clever use of colour and transparency!

transparency is the key, so behold my implementation, and the source code is here.