.img{
width: 100%;
height: 0;
margin: 0 auto;
padding-bottom: 100%;
position: relative;
img{
position: absolute;
width: 100%;
height: 100%;
}
}
css 高度和宽一样
最新推荐文章于 2024-07-17 18:42:40 发布
.img{
width: 100%;
height: 0;
margin: 0 auto;
padding-bottom: 100%;
position: relative;
img{
position: absolute;
width: 100%;
height: 100%;
}
}