css图片单页

页面就一张图片,无论PC或mobile打开都让图片充满整个屏幕

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>剧本鲨俱乐部!</title>
    <style>
    *{
        margin:0;
        padding:0;
    }
    .box {
        width: auto;
        height: 100%
    }

    .box img {
        width: 100%;
        height: 100%
    }
    </style>
</head>
<body>
    <div class="box">
        <img src="photo_2023-06-17_21-49-52.jpg" />
    </div>
</body>
</html>

仅有一条评论

添加新评论