Skip to content

Comment on CSS Panic: Game written in HTML/CSS - no Javascript

Comments

How can one implement game logic and AI in CSS? I thought CSS can do nothing much other than styling except mouse hover property which gives some interactive elements without JS.

It has no AI, the croc's movement is scripted. CSS can do a lot more than changing style on mouse hover. Check out the pseudo-elements, the transitions, the :target selector.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.