mdn refers to the width of the browser viewport (viewport) (in pixels), including it if there is a vertical scroll bar. After reading it, I still don"t quite understand
and Google and Firefox behave differently
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
* {
padding: 0;
margin: 0;
}
.box1 {
width: 500px;
height: 200px;
border: 1px solid red;
}
</style>
</head>
<body>
<div class="box1"></div>
</body>
</html>
the same code, the output of the two browsers are not the same