【问题标题】:Product Images don't show (Woocommerce)产品图片不显示(Woocommerce)
【发布时间】:2016-06-09 05:29:53
【问题描述】:

我的产品图片出现了,但是当我点击进入产品页面时,图片被隐藏了,只有在我点击的时候才会出现。某些产品会在其他浏览器上显示。某些产品仅在 Microsoft Edge 上显示。

编辑: 真正的问题是 cloudflare 火箭加载程序,它阻止了网站的一些 javascript。通过禁用该选项,它解决了问题。

【问题讨论】:

  • 请注意,这发生在有孩子的产品上,即可变产品,而不是简单的产品

标签: wordpress image woocommerce


【解决方案1】:

在您的 CSS woocommerce.css 中有 .product.has-default-attributes.has-children > .images 类将 opacity 设置为 0 更改或删除此类或从您的主题 css 中覆盖类

.product.has-default-attributes.has-children > .images{opacity: 0;}

.product.has-default-attributes.has-children > .images{opacity:1;}

图像仅在点击时出现因为点击.image 类后使用JQueryopacity 添加到1

【讨论】:

  • 你知道为什么不透明度为0吗?对我来说似乎很奇怪,除非有一些 JS 来显示它们(这在我的身上被打破了)但是他们不应该依赖 JS 来显示图像。
【解决方案2】:

有 CSS 问题,在 woocommerce.css 这个类 .product.has-default-attributes.has-children > .imagesopacity:0 你需要设置这个类 opacity:1 波纹管是 sn-p

.product.has-default-attributes.has-children > .images {opacity :0}

将此行改为

.product.has-default-attributes.has-children > .images{opacity :1;}

【讨论】:

    【解决方案3】:

    只需添加这个 css

    .woocommerce-product-gallery {opacity: 1 !important;}
    

    我真的不知道纠正这个问题的最佳方法。

    【讨论】:

      【解决方案4】:

      在另一个支持网站上找到了这个 css,它为我修复了它:

      .woocommerce div.product div.images.woocommerce-product-gallery 
      {
      opacity:100!important;
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2018-08-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-08-10
        • 2018-12-09
        • 1970-01-01
        相关资源
        最近更新 更多