SHANGHAI — In 2016, after Donald Trump won the Republican nomination for president, social media in China embraced him with tribute pages including the “Trump Fan Club” and “Great Man Donald Trump.”

But those pages no longer see much activity.

Remarks about Trump on Chinese social media — one of the only gauges of public sentiment in a country with limited opinion polling — have taken a sharply negative turn. A recent sampling: “A rogue villain with no credibility.” “A dishonest and greedy merchant, and an unpopular senile politician.” “An erratic and unreliable leader like a clown.”

One of his most popular nicknames on Weibo — China’s version of Twitter — is Chuangpo, which means to charge in and break things.

The Trump that many liked before — business magnate, charismatic winner, flexible pragmatist — has been overshadowed by one with a bombastic style whose policies are widely seen as endangering China’s rapid economic growth as well as its global standing.

Besides placing tariffs on Chinese goods, the Trump administration has called President Xi Jinping’s signature economic plan — Made in China 2025 — a threat to American interests and blocked state-owned China Mobile and other high-tech firms from the U.S. market. In doing so, Trump is striking at pocketbooks and at national pride — and stirring worry in the Chinese Communist Party, which has maintained political legitimacy largely through its handling of the economy.

During the U.S. presidential race, Chinese policymakers tended to favor Trump over his opponent Hillary Clinton, because he was seen as less likely to press China on its human rights violations or its controversial construction of military facilities near critical shipping routes through the South China Sea, according to Merriden Varrall, a China analyst at Lowy Institute think tank in Sydney.

“They thought, ‘OK, this is going to be our big break because Trump obviously doesn’t care about these issues. He’s just out to make deals. He’s not worried about what we’re doing over here or what we’re doing internally so we’ll get a bit of a break from the U.S.,’ ” she said.

The admiration for Trump came despite signs that he could cause trouble for China. In May 2016, he vowed he would not allow China to continue to “rape” America on trade. “It’s the greatest theft in the history of the world,” he said.

Many Chinese didn’t hear such bellicose rhetoric or dismissed it as campaign hyperbole.

By the spring of this year, however, Trump had slapped tariffs on Chinese solar panels and steel and was threatening to target more goods — and sentiment in China had turned.

China and the U.S. appeared close to a deal on trade in May after Chinese Vice Premier Liu He, Xi’s top economic advisor, met with Trump and other officials and pledged to buy tens of billions of dollars more in U.S. soybeans, natural gas and other goods by 2020.

Within days, Trump announced flatly: “There is no deal.”

China would have to help America in unrelated areas — for example, pressuring North Korea to abandon its nuclear weapons program — in return for any trade agreement, the president suggested before expanding the tariffs to hundreds of Chinese-made industrial parts and other products.

“Ultimately, the thing that the Chinese were pleased about in 2016 — that Trump is a non-ideological deal-making negotiator — has kind of come back to bite them,” Varrall said.

Fears of a full-blown trade war have trickled down from the elite to ordinary citizens here in Shanghai.

Du Haiyun, 35, a telecommunications worker from north-central Ningxia, said Trump’s business background initially attracted him. These days, Du fears that Trump’s actions could threaten the gains made in the provincial capital, Yinchuan, where a subway is being built and unemployment has decreased.

“We’re very worried about U.S.-China relations,” he said, sitting on a bench under a hot afternoon sun in People’s Park. “We don’t want a trade war. We want a softer policy.”

But the anti-Trump sentiment isn’t just about economic issues.

“He carries himself like he’s king of the universe,” said Li Daoqi, a 35-year-old food deliveryman from Hunan province. “Trump is always bullying but actually it’s a sign of weakness. In Chinese culture, we appreciate people who are humble. You shouldn’t show off.”

Yvette Zhang, 25, a Shanghai University graduate working in sales at an international hotel, said Trump’s style and intemperate tweets lacked dignity and were unbefitting of a national leader.

“Our president doesn’t use Weibo,” she said.

Browsing at Shanghai Bookstore on Fuzhou Road, a 28-year-old fashion designer who gave his name only as Lee because of the sensitivity of the subject, said Trump was as polarizing a figure in China as he was in America.

Some of his friends admired Trump for his straight-talking, emotional rhetoric. But he and others found the U.S. leader volatile and difficult to comprehend.

“Sometimes he says something and after a few days he changes his mind. I don’t know why,” he said.

The feelings about Trump to a large degree have been shaped by how he is portrayed in the state-controlled media. Coverage has hardened as the trade fight has escalated.

The recent attacks have mostly been directed at his administration rather than at Trump personally. The People’s Daily, the Communist Party’s official publication, last month called the administration unruly, self-serving, fickle and obstinate, adding that America had “squandered its own national credibility” over its trade threats and that “international opinion is shocked by the shortsighted behavior of the U.S.”

Gao Feng, a spokesman for the Chinese Commerce Ministry, last month called the U.S. “capricious,” saying it had “escalated the tensions and provoked a trade war.” In an interview with the Wall Street Journal in April, Finance Minister Lou Jiwei described Trump as an “irrational type.”

Mei Xinyu, a researcher at a think tank affiliated with the Commerce Ministry, has criticized Trump’s “childish tactics.”

For all of the worry Trump has caused them, Xi and other elites also see his chaotic administration and erratic behavior as an opportunity to advance Beijing’s authoritarian model and to assume a greater role in world politics.

That strategy is apparent in the dominant story line on Trump in state media, which holds that the president symbolizes American decline and weaknesses in U.S. democracy, and that as Washington abdicates its leadership on the world stage, Beijing will fill the void.

“They want to create this image that the U.S. is not the great power, is not the almighty hegemon,” Varrall said. “And so this ridiculing of Trump ... just fits perfectly into that narrative.”

robyn.dixon@latimes.com

don.lee@latimes.com

Dixon reported from Beijing and Lee from Shanghai.