How to explain the following css phenomenon

<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8"/>
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="renderer" content="webkit"/>
    <style>
      
        .float {
            float: left;
            height: 100px;
            background: rebeccapurple;
        }
        .box {
            clear: both;
            background: green;
            height: 100px;
            margin-top: 10px;
        }
    </style>
</head>
    
    
<body>
   <div class="float"></div>
    <div class="box"></div>
</body>
</html>

increase the value of margin-top when the box element is set to clear:both, or decrease the value of margin-top
the box element does not move
when the box element does not set clear:both, it increases the value of its margin-top, or decreases the value of margin-top
the box element and the float element move together

Mar.01,2021

is mainly caused by outer margin folding. You can learn about outer margin folding first.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bcb6-2c2db.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bcb6-2c2db.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?