使用CSS Flexbox的:
包装你.city到父
.city-holder {
display: flex;
}
看一看下面的代码片段:
.city-holder {
display: flex;
}
Cities Of The World
London
London is the capital city of England.
It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.
Paris
Paris is the capital of France.
The Paris area is one of the largest population centers in Europe, with more than 12 million inhabitants.
Tokyo
Tokyo is the capital of Japan.
It is the center of the Greater Tokyo Area, and the most populous metropolitan area in the world.
New York
The City of New York is the most populous city in the United States.
New York is an important center for international diplomacy and has been described as the cultural and financial capital of the world.
使用col-xs-*,看看下面的代码片段:
Cities Of The World
London
London is the capital city of England.
It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.
Paris
Paris is the capital of France.
The Paris area is one of the largest population centers in Europe, with more than 12 million inhabitants.
Tokyo
Tokyo is the capital of Japan.
It is the center of the Greater Tokyo Area, and the most populous metropolitan area in the world.
New York
The City of New York is the most populous city in the United States.
New York is an important center for international diplomacy and has been described as the cultural and financial capital of the world.
希望这有助于!