Geometry warm-up
Which dot went farther?
Both start at the same point and move in a straight line. Pick the longer trip.
- A
- 45 px right 45 px traveled
- B
- 40 px right, 30 px down 50 px traveled
The horizontal and vertical moves are the legs of a right triangle. B travels along its diagonal. Move the slider to see when the winner changes.
transform: translate(40px, 30px);
Want to see CSS compare distances? Watch Kevin Powell’s walkthrough of Temani Afif’s graph theory demo.