CSS flex-wrap属性的作用no-wrap值
使用具有nowrap值的flex-wrap 属性可以避免要包装的flex项目。
示例
您可以尝试运行以下代码以实现nowrap值-
<!DOCTYPE html>
<html>
<head>
<style>
.mycontainer {
display: flex;
background-color: orange;
flex-wrap: nowrap;
}
.mycontainer > div {
background-color: white;
text-align: center;
line-height: 40px;
font-size: 25px;
width: 100px;
margin: 5px;
}
</style>
</head>
<body>
<h1>Quiz</h1>
<div class = "mycontainer">
<div>Q1</div>
<div>Q2</div>
<div>Q3</div>
<div>Q4</div>
<div>Q5</div>
<div>Q6</div>
<div>Q7</div>
<div>Q8</div>
<div>Q9</div>
</div>
</body>
</html>热门推荐
10 盛夏的温馨祝福语简短
11 打游戏通关祝福语简短
12 哥哥新婚祝福语创意简短
13 白羊生日祝福语 简短独特
14 给老板祝福语简短精辟
15 简短古文生日祝福语
16 分手快乐祝福语简短
17 鱼的内涵简短祝福语
18 餐前仪式祝福语简短