Here’s an example: In an ecosystem, some giraffes have long necks and others have short ones. If something caused low-lying shrubs to die out, the giraffes with short necks would not get enough food. After a few generations, all the giraffes would have long necks.