<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box {
margin: 50px auto;
width: 300px;
height: 300px;
display: flex;
flex-wrap: wrap;
}
.box div {
width: 100%;
}
</style>
</head>
<body>
<div class="box">
<div style="background-color: red;"></div>
<div style="background-color: yellow;"></div>
<div style="background-color: black;"></div>
</div>
</body>
</html>
如上,为什么不能给box下面的div加上height的值?为什么设置width=100%后不换行则从左到右等分为三份?而设置height=100%换行后不能从上到下等分为三份?