SHANGHAI — Perhaps no country has taken more hits from Donald J. Trump than China. During the presidential campaign, Mr. Trump made it sound as if making America “great again” meant defeating China.

But much of the Chinese public supported him. And President Xi Jinping was among the first world leaders to congratulate him. Mr. Xi, in his message to the president-elect, expressed hopes of building on the “common interests” between the world’s two largest economies.

Beijing is looking forward to change in Washington. For the Chinese, the Obama era has been the most difficult period in United States-China relations since President Richard M. Nixon renewed ties in 1971. The Obama administration, with Hillary Clinton as secretary of state, made its “pivot to Asia” about containing Beijing, aiming to strengthen and enlarge the American alliance system in the Asia-Pacific region while increasing America’s military footprint there. The pivot was backed by an economic plan, the Trans-Pacific Partnership, a now-moribund trade pact created in part to isolate Beijing.

Since the end of the Cold War, from President Bill Clinton to President Obama, the United States has been trying to remake the world in its own image — building an American empire in the name of globalization. Through ever larger and more complex alliances and global institutions that the United States designed, Washington has sought the global standardization of rules in trade, finance and international relations. It has used political, economic and military might to push other countries to adopt electoral democracy and market capitalism.