css - Photo cover in WooCommerce

Today I'm working on thewebsite. But the image there is incorrect, because I've set the img to object-fit:

Today I'm working on the / website. But the image there is incorrect, because I've set the img to object-fit: contain, but if I leave it blank, then it is a weird photo that is zoomed in.

Can anyone help me with it?

Today I'm working on the https://www.vanleeuwenemmen.nl/winkel/ website. But the image there is incorrect, because I've set the img to object-fit: contain, but if I leave it blank, then it is a weird photo that is zoomed in.

Can anyone help me with it?

Share Improve this question asked Oct 21, 2019 at 12:19 Valdemar - memo ictValdemar - memo ict 1
Add a comment  | 

1 Answer 1

Reset to default 0

You are using cropped image. Your image is 300x300 cropped while the section is bigger. Your first div is already set to 40% width, so limiting the image to 40% in that section doesn't make sense. Use properly sized thumbnail or actual image.

Here is the result i got using actual image /3dcc1cba-c209-4a1a-a1f2-edd17fc8b58e.jpg & NOT 3dcc1cba-c209-4a1a-a1f2-edd17fc8b58e-300x300.jpg using following CSS:

.woocommerce li.product .entry-featured img {
    display: flex;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745065572a4609234.html

相关推荐

  • css - Photo cover in WooCommerce

    Today I'm working on thewebsite. But the image there is incorrect, because I've set the img to object-fit:

    16小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信