Back to portfolio

CSS & JAVASCRIPT

Interactive CSS Robot

I <3 JS!

How it works

Click the red arm or focus it and press Enter to raise and lower it.

JavaScript toggles a CSS class on the arm. That class rotates it 90 degrees around the shoulder, while aria-pressed records whether it is raised.

Concepts: DOM events, CSS transforms and keyboard controls.