Two years ago, it was one of the hottest areas in tech investing. Venture capitalists were lining up to throw money at it. But now, after disappointing IPOs, investors are fleeing.

Social networking? Nope. China.

In the past few years, virtually every venture shop worth its salt set up operations in the Middle Kingdom, home to one of the world's fastest-growing economies and a ­billion-strong consumer marketplace. Firms rushed to join Chinese ventures or send partners to China.

But last year, venture capitalists largely abandoned China, in large part because of underwhelming stock offerings by Chinese firms on both domestic and U.S. exchanges.

Consider: Thirty-eight Chinese firms went public in 2010 in the United States. The next year, just 15 did so, and last year's number was only two, said Jeff Richards of GGV Capital, a firm with dual headquarters in Shanghai and Menlo Park, Calif.

"In 2010, investors were paying a premium for Chinese IPOs," Richards said. "Some of those IPOs have not performed well, and there's not much enthusiasm right now on the part of some of the momentum funds to invest in more start-ups there."

And while many Silicon Valley venture firms made money in the United States amid Wall Street's IPO doldrums through a robust mergers-and-acquisitions market, Chinese entrepreneurs tend to be reluctant to sell their companies, Richards said.

Dow Jones VentureSource reported last month that venture investment in mainland China dropped 40 percent in 2012 compared with the previous year. The 202 Chinese companies that raised venture money last year were outstripped by the number in Britain. And the $3.7 billion invested in China, the world's second-largest economy, was just 12 percent of the amount raised by U.S. start-ups.

Compare those numbers with 2011, when venture investment in China peaked at $6.3 billion spread across 362 deals.

"VC ardor has cooled around investments in Chinese companies," said Andrew Chung of Menlo Park-based Khosla Ventures. Like others, he cited uncertainties about the Chinese economy, the dearth of IPOs and the rise of "copycat" companies that some say simply ape ideas from Western tech darlings. "There's too much capital chasing too few deals."

Still, some firms — ranging from powerhouses like Sequoia Capital and Accel Partners to specialty shops like GSR Ventures and Richards' GGV — are convinced the Chinese market remains ripe for clean tech, mobile and other deals.

"You can't ignore the kind of opportunity in China," Chung said. "In clean tech, for example, the government plans to invest $80 billion per year for the next 10 years."

At the same time, other Silicon Valley venture firms have grown wary of China's often opaque regulatory environment and loose approach to intellectual property laws.

"We're skeptical of the environment," said John O'Farrell of Menlo Park's Andreessen Horowitz, a firm not known as risk-averse. "The deck is stacked against foreign companies."