Substantial collective flow is observed in collisions between large nuclei at high energy, and the data are well-reproduced by perfect fluid dynamics. In a separate development, calculation of the dimensionless ratio of shear viscosity η to entropy density within AdS/CFT yields η/s = 1/4π, which has been conjectured to be a lower bound for any physical system. It is shown that the transition from hadrons to quarks and gluons has behavior similar to helium, nitrogen, and water at and near their phase transitions in the ratio η/s. Conversely, there are indications that the ratio of bulk viscosity ζ to entropy density may have a maximum in the vicinity of the phase transition. Therefore it is possible that experimental measurements can pinpoint the location of the transition or rapid crossover in QCD via the ratios η/s and ζ/s in addition to and independently of the equation of state.