图片自适应宽高
图片自适应 父元素大小。不会被拉伸。
<head>
<style type="text/css">
.box{
width: 300px;
height: 300px;
}
img{
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
}
</style>
</head>
<body>
<div class="box">
<img src="./微信图片_20201209184929.png" alt="">
</div>
</body>


7710

被折叠的 条评论
为什么被折叠?



