News for hackers. Stuff that matters.
Re:CSS3 Ping Pong, with scoring by huskerfan711 on Wednesday May 08, 2013 @01:25AM (#5672665)
Pretty cool, has a few glitches though.

Such as if you just click the ball and never move your paddle you can never be scored on unless you move your paddle

Re:CSS3 Ping Pong, with scoring by alexmwalker on Wednesday May 08, 2013 @04:25AM (#5673131)
I don't think there's anything I can do about that -- short of using JavaScript, which kinda defeats the purpose.

Basically, every time you move the cursor, the browser checks to see if you triggered a new hover state. If you keep still it assumes nothing has changed.

In this demo it's the thing being 'hovered over' that's doing a lot of the moving -- but the browser doesn't ever check for that.

Maybe there's a better alternative to :hover? CSS is obviously a limited toolset when it comes to this kind of thing.

The challenge is there for anyone who wants to fork it ;)