The end of butterfly legs has hooks that allow them to attach to surfaces without using much energy. This enables butterflies to cling to vegetation while their wings unfurl and also aids in perching on leaves or branches.