CSS Physics
Adam Argyle
May 31, 2024
Physics in CSS! I transferred a JS physics function into CSS thanks to sqrt() , exp() , sin() , cos() and @property . :root { --mass : 1 ; --stiffness : 100 ; --damping : 5 ; --start-velocity : 0 ; } Check it out on Codepen . Change the properties and see a different animation.
Discussion in the ATmosphere