It *can* affect any dog, however it is very very rare in small dogs. It is mostly commmon in very large breeds & especially those with deep chests. Mainly it occurs when the dog eats then excersizes right after. It is also known as gastric torsion.
It also happens more frequently when you only feed once a day (a no-no anyways especially for large dogs, feeding multiple times helps in many other ways too) also if they tend to gulp down their food or water and also in large dogs if their dish is very low to the ground.
here is some more info on it:
http://www.canismajor.com/dog/bloat.html