Hacker News new | ask | show | jobs
by Houshalter 3587 days ago
Tangent: that's really cool that wikipedia has interactive graphics and not just static images. In fact, and maybe I'm stupid, but I had no idea that svgs could be interactive until this moment. I thought they were just a vector image format.
3 comments

SVGs can contain CSS and Javascript, and even without that, you can make all kinds of animations completely in SVG markup, using SVG-SMIL. I'm just saying this as trivia, and emphatically do not recommend that you go down this collapsing rabbit-hole.

Ignore that the Wikipedia page currently calls it "a recommended means[1][2][3] of animating SVG-based hypermedia" (lol). It's a complex feature that browsers have been dragging along for years while nobody's using it. Though it seems that Chrome is finally taking the initiative of dropping support, or at least discouraging its use.

They aren't interactive, but since their XML can be directly embedded in an HTML document they can be manipulated through the DOM.
It is interactive. Hovering over different pyramids fills in the shape of just that pyramid, and you can interact with any of them by clicking on it to bring you to the Wikipedia article on it.

I too didn't realize that this was possible in SVGs. It's awesome.

It's just CSS.
CSS styles