Doing it with style
Remember this is just for fun to see if it could be done using just CSS.
Whilst visiting the CSS3 PONG by Alex Walker, I noted that he had two issues with his version that he would like to fix:
1. I'd love to limit the movement of the bat to vertical only.
2. If the player doesn't move at all, he/she can cheat. Basically we're relying on ':HOVER' to determine if the animation continues or ends. When your cursor is stationary the browser doesn't ever recheck to see if the hover state has changed.
So not being able to resist a challenge I have produced this second version of the game which fixes both these issues, BUT it does only work in Firefox.
Firefox is the only browser that continuously monitors the :hover state even when the mouse is not moving.
So in this final version you click the ball to start the game and then control your 'bat' in the vertical direction only with the mouse.
Because of all the time and effort spent in producing this demonstration I would ask that you respect my copyright.
Your donations keep CSS PLAY running.
If your donation is for the use of a demo then please email me with the demo url after making your donation.