China needs energy, and is now craving status. Both would be what Putin would offer. In order for China to ever be the superpower they crave the US must be knocked down in status. Our strength smothers their pride, and our geopolitical goals are not in line with theirs.
China didn't side with Russia during the Russian war with Georgia. China is doing its best to stay out of this whole mess. Even Chinese state media, which likes to take anti-American jabs now and then, has been pretty neutral throughout all this.
First, China is sane. The Chinese leadership, after seeing the disaster that Mao wrought, decided to never again have a 1-person despot. The Chinese system currently has power split between about half a dozen people--president, premier, party chairman, etc.--and in which everyone is subject to
term limits (contrast that with Putin, who's in the 14th year of his tsardom and to whom Medvedev is just a token puppet). That's why every decade or so, the Chinese president (and everyone else in the leadership) voluntarily steps down and a new one steps in. It's still far from democratic (nor do they publicly vilify Mao even though everyone quietly knows that these safeguards were the direct result of lessons from his misrule), but it's nothing like Russia's or North Korea's single-person despotism (in fact, they are downright annoyed at NK right now, and it wouldn't surprise me if they are privately facepalming Putin's latest antics). Take away personal egos, and what you get is a China that acts in a far more rational, calculated way, when compared to other despotic countries, and it's why China isn't likely to embark on phallus-size competitions like Putin or throw crazy tantrums like Kim.
Because their heads are still screwed on, they probably see the dangers of setting a precedent for supporting separatism. Russia on one hand encourages Crimea to separate from Ukraine based on ethnic makeup, yet on the other hand clamps down on similarly-reasoned separatism in parts of Russia. It's likely that China realizes this and would prefer to avoid it (esp. since it doesn't gain them
anything to speak in favor of Crimea's separation) lest it be used against them when one of China's separatist regions gets ideas.
China is also sane enough to realize that an economic war with the West would result in mutually-assured economic destruction. So much of China's economy depends on trade with the West (even though the 2008 financial collapse didn't directly affect China, the indirect effects resulting from decreased trade was so devastating that they required a stimulus program, that, when adjusted for the size of their economy, was bigger than ours--and that was them feeling just the indirect effects of the crisis), and so much of our economy now relies on Chinese manufacturing that any serious disruption to that would be devastating for us
and for them. And since they still have their heads screwed on straight unlike Putin, I can't imagine them jumping off that particular cliff.
Second, China simply doesn't really like Russia all that much. Back during the Cold War, there was some warmth with the USSR at first, but that quickly degenerated and eventually led to
armed conflict between China and the USSR. Just because you're both Communist and anti-American doesn't mean that you're automatically friends; see also the
Sino-Vietnamese War for another Commie-vs-Commie conflict that most Americans don't know about. This is why China sought relations with the US (remember Nixon?), because they saw the USSR as an even greater threat than the US. Things are better now, and China does side with Russia on a number of foreign policy issues, but they are
not BFFs as many mistakenly assume.