Wearing ankle boots with leggings can be somewhat tricky, but that doesn't have anything to do with the leggings. It's actually ankle boots, in general, are problematic for a lot of women. This is because of where the boots hit on the legs, which, as the name implies, is usually right above the ankles -- i.e., one of the thinner part of a woman's legs. So, what happens is the boots making the thicker part of the calves (the part just above the top of the boots) look even thicker -- and shorter.
Wearing leggings (or tights) with ankle boots is actually more flattering on most women than ankle boots and bare legs. But, unless you actually want your legs to look shorter and heavier, you'll want to avoid mixing really lightly-colored or pastel leggings with darker ankle boots.
For a thinner, more cohesive appearance, choose dressier ankle boots, or styles that are a bit loose around your legs; match the leggings to the ankle boots; and opt for dark colors on both the leggings and the ankle boots.
Shorter booties can also work really well with long leggings. To make it easy to choose the right style, just follow the same general rules that you would for pairing tights with booties: make sure the entire leg is covered by your leggings, and pair the combination with a top, skirt or dress that hits mid-thigh or lower on the legs.