您正在使用裁剪图像。您的图像是300x300裁剪的,而剖面更大。您的第一个div已设置为40%宽度,因此限制image 在那一部分中达到40%是没有意义的。使用大小合适的缩略图或实际图像。
这是我用实际图像得到的结果/3dcc1cba-c209-4a1a-a1f2-edd17fc8b58e.jpg
&;NOT 3dcc1cba-c209-4a1a-a1f2-edd17fc8b58e-300x300.jpg
使用以下CSS:
.woocommerce li.product .entry-featured img {
display: flex;
width: 100%;
height: 100%;
object-fit: contain;
}
