<!DOCTYPE html>
<html>
<head>
<style>
.flex-container {
display: flex;
flex-wrap: nowrap;
background-color: DodgerBlue;
}
.flex-container > div {
background-color: #f1f1f1;
width: 100px;
margin: 10px;
text-align: center;
line-height: 75px;
font-size: 30px;
}
</style>
</head>
<body>
<h1>弹性盒子</h1>
<div class="flex-container">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
</div>
<p>尝试调整浏览器窗口的大小。</p>
<p>带有"flex-wrap: nowrap;"的容器永远不会包裹它的物品。</p>
<p><strong>注意:</strong> Internet Explorer 10 或更早版本不支持 Flexbox。</p>
</body>
</html>