0
問題は、親divに右パディングがなく、子divに右マージンがないことです。私はクロムを使用しています。オーバーフロー:auto - 右パディングとマージンなし、chrome
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Template</title>
</head>
<body>
<div style = "padding: 50px; overflow: auto; width: 300px; height: 300px; background-color: red;">
<div style = "width: 500px; height: 500px; background-color: green;"></div>
</div>
<hr />
<div style = "overflow: auto; width: 300px; height: 300px; background-color: red;">
<div style = "margin: 50px; width: 500px; height: 500px; background-color: green;"></div>
</div>
</body>
</html>