How can a gecko walk straight up a pane of glass?

Its toes carry millions of microscopic hairs. Each hair gets so close to the surface that tiny attractions between molecules add up — billions of them together can hold the gecko's whole body.

From But WHY?! (p.77) — one of 162 illustrated answers for curious kids aged 7–12.