Answer:
As time progressed, to reach the tops of trees to eat their leaves, the giraffe's necks grew longer. Those without long necks could not reach the leaves and began to die off. This allowed only giraffes with long necks to survive. Eventually, their necks grew to the length they are now.
Hope this helps!