gpt4 book ai didi

css - Woocommerce Storefront 为主页上的产品类别添加悬停效果

转载 作者:太空宇宙 更新时间:2023-11-04 01:58:07 25 4
gpt4 key购买 nike

我想在主页上添加悬停效果,如下所示: http://demo.woothemes.com/?name=galleria&_ga=1.242371650.1503770507.1481544136

我找到了一种在产品中添加悬停效果的方法

/* Make product in categories glow on hover */
.woocommerce-page ul.products li.product:hover {
box-shadow: 0 0 20px #1e73be;
}

但我找不到在主页部分为产品类别制作此内容的方法。

我使用店面子主题大师来编辑店面主题: https://github.com/stuartduff/storefront-child-theme

感谢任何形式的帮助,

问候,

最佳答案

更新的答案:

您首先需要更改 h3 标题的位置和可见性。

ul.products li.product.product-category h3 {
top: 0;
width: 100%;
height: 100%;
position: absolute;
opacity: 0;
padding-top: 25%;
background: rgba(255,255,255,.6);
}

然后让它在悬停时可见。

ul.products li.product.product-category:hover h3 {
opacity: 1;
}

这是我可以在不进行媒体查询的情况下尽可能接近演示:/

关于css - Woocommerce Storefront 为主页上的产品类别添加悬停效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42247119/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com