为什么设置div浮动,不会影响其后面的img元素?

<style>
        .box{
            width: 1260px;
            height: 460px;
        }
        .box img{
            width: 100%;
            height: 100%;
        }
        .box div{
            width: 100px;
            height: 100px;
            background-color: red;
            float: left;
        }
        p{
            height: 360px;
            background-color: blue;
        }
    </style>
<body>
    <div class="box">
        <div></div>
         <img src="./images/03.png" alt="">
        <!-- <p></p> -->
    </div>
</body>

这段代码里,给div设置了浮动,后面的img元素却不会受到影响。但是换成p元素,却会向上移动,产生覆盖的效果?怎么才能使得img元素也产生像p元素一样的效果呢?

img

img


<style>
        .box{
            width: 1260px;
            height: 460px;
            position:relative;
        }
        .box img{
            width: 100%;
            height: 100%;

        }
        .box div{
            width: 100px;
            height: 100px;
            background-color: red;
            position:absolute;
            top:0;
            left:0;
        }
        p{
            height: 360px;
            background-color: blue;
        }
    </style>
<body>
    <div class="box">
        <div></div>
        <img src="aa/dygj-m/images/index_01.jpg" alt="">

    </div>
</body>