there are two points mentioned in the authoritative guide of 1.css: when the sum of the horizontal parts of the block-level element box in the normal flow is equal to the width;width, margin-left, and margin-right of the parent element are all set to specific values, these formatting attributes are too limited, and margin-right will always be cast to auto.
2. But what is observed in the actual chrome is not like this. We can see the box model of the child elements
does not satisfy that the sum of the horizontal parts of the block-level element box in the normal flow is equal to the width, of the parent element and does not satisfy that width, margin-left, and margin-right are all set to specific values, margin-right will be forced to convert to auto.
3. The code is as follows:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8"/>
<title></title>
</head>
<style type="text/css">
*{
padding: 0;
margin: 0;
}
.parent{
width: 600px;
background-color: red;
border: 1px solid;
}
.children{
height: 100px;
width: 200px;
margin: 100px;
background-color: black;
}
</style>
<body>
<div class="parent">
<div class="children"></div>
</div>
</body>
</html>
4. Is there something wrong with my understanding?