我正在努力解决我网站上的悬停问题。每当我滚动一个产品时,产品说明就会显示在它下面,而我终究无法弄清楚如何修复它:
它使用的是有感知的主题,但是在 firebug 中花了一些时间试图深入研究 css 之后,我仍然无法弄清楚如何移动产品描述,以便它显示在图像的顶部而不是下面
非常感谢任何帮助。谢谢!
最佳答案
我认为这对你有用:
// removes img from the flow, so doesn't push other elements down:
.product > img{position:absolute;z-index:1}
//on hover, give the other elements positioning & z-index
// so they're not hidden by the image:
.product:hover h3,
.product:hover .amount,
.product:hover .excerpt,
.product:hover .button add_to_cart_button product_type_simple
{position:relative;z-index:2}
关于css 在 wordpress 主题上的错误位置徘徊,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10590929/