关于html:如何使用CSS将矩形图像“裁剪”为正方形
没有包装div或其他无用代码的纯CSS解决方案:
img {
object-fit: cover;
width:230px;
height:230px;
}
参考链接:https://www.codenong.com/15167545/
没有包装div或其他无用代码的纯CSS解决方案:
img {
object-fit: cover;
width:230px;
height:230px;
}
参考链接:https://www.codenong.com/15167545/