Aquatic
Several kinds of rodents are semi-aquatic, although they aren't particularly closely related. These include beavers, coypu and water voles. They are adapted to their watery habitat. Beavers, for example, have webbed hind feet and the ability to close their ears and noses when underwater. A coypu can hold its breath for up to 10 minutes.
Arboreal
The most familiar tree-living rodents are squirrels, although not all squirrels are arboreal. There are other arboreal rodents, such as woodrats and tree voles. Squirrels usually eat whatever their habitat provides, mainly nuts and seeds but also birds' eggs, leaves, fungi, sap and insects. Red tree voles, in contrast, have an extremely specialized diet, eating almost exclusively the needles of a particular kind of fir tree.
Burrowing
A few rodents live almost entirely underground and many others, such as prairie dogs, dig themselves underground hideouts. Of the exclusively burrowing rodents, the naked mole rats are some of the strangest. These little animals have a social structure more similar to that of bees and ants than mammals. One female produces and nurses all the offspring for a structured colony and the others are workers.
Omnivores, Herbivores and Seedeaters
A few of the larger rodents share the grazing animal niche. The most familiar and prolific rodents are the highly adaptable omnivorous mice, rats and their relatives, which include common pets such as hamsters and gerbils. These rodents have now occupied every continent except Antarctica, although it took accidental human help to get them to Australia and New Zealand.
Carnivores
Few rodents are true carnivores, although many eat animal food if available. There are exceptions though, notably the grasshopper mice. These are ferocious little predators that stalk and kill their prey of insects, scorpions, spiders and other small mammals.