Investors are fleeing China's big tech companies.

The country's major players -- Baidu (BIDU), Alibaba (BABA) and Tencent (TCEHY) -- have lost hundreds of billions of dollars in market value in the past few months.

And the slump is wider than just those three. While US tech stocks have generally been on the rise -- the Dow Jones Internet Composite Index is up more than 25% this year -- their Chinese counterparts have headed in the opposite direction. An index that tracks leading Chinese tech companies is down about 12%.

Some market experts say investors got carried away and ignored warnings that they were paying far more than Chinese internet companies' earnings justified.

Mohammed Apabhai, head of Asia trading strategy at Citigroup, likens the exuberance for tech stocks to the Looney Tunes cartoons in which Wile E. Coyote chases Road Runner over a cliff.

"You know when he goes over the edge and he keeps pedaling before he drops?" Apabhai said. "It's like that."

Related: Tencent has a major gaming problem

The sector suffered a heavy blow this week after Tencent, whose businesses include social media and online gaming, stunned investors with a surprise fall in operating profit. It blamed difficulties with its video game business in China for the disappointing performance.

"When earnings actually decline instead of go up, there's no way you can justify those stocks" at high valuations, Apabhai said.

Late last year, Tencent's market value eclipsed Facebook's (FB). But since January, the Chinese company's value has shed more than $160 billion.

Shares in Baidu, China's biggest search engine, have also been clobbered by an unexpected management reshuffle and reports that rival Google could be bringing a censored version of its search app to China.

China's slowdown

Chinese tech stocks are also suffering from broader concerns about the health of China's economy, which has started to slow down. That's prompted worries about what the impact could be on companies in many industries, hurting Chinese stocks across the board.

"There are some hiccups and some stuttering happening in the China economy, and that's going to ripple through all of these names whether its Alibaba or Tencent," Colin Gillis, director of research with Chatham Road Partners, said on CNN this week.

Related: China's Tencent turns to US for IPO of its music business

The trade war with the United States is adding to the unease. China's championing of homegrown tech industries is a key element in the tensions between Beijing and Washington.

"Given that we've got new tariffs coming in on August 23, it's not directly impacting any of these [tech] names, but there's no need to be jumping into these stocks right now," Gillis said.

Bad time to go public

Chinese tech companies who only recently went public are also having a rough ride.

Smartphone maker Xiaomi was at one point reportedly seeking to raise $10 billion in one of the most highly anticipated IPOs of the year. But in the end the company raised less than half that amount, and its Hong Kong-listed stock is now trading below its IPO price. Xiaomi's CEO has blamed the trade war for making market conditions difficult for its listing.

Related: China is it making it harder to invest in smartphone maker Xiaomi

E-books company China Literature popped as much as 100% on its market debut late last year. But its share price has more than halved since then, falling about 10% below the IPO price this week after investors reacted badly to its plans to buy a movie company.

Despite the gloom, plenty of analysts remain upbeat about the longer-term prospects for some Chinese tech stocks.

Tencent "is a company that's gone from gaming to social networks, to commerce, to payments, to venture capitalist, and is now the largest tech company by valuation size" in China, Ray Wang, an analyst with Constellation Research, said on CNN this week.

The stock's recent declines offer investors an opportunity in his view: "I think it's a good time at the moment, because the overall fundamentals are good."