css - 更新主题后悬停图像不显示

标签 css hover

这是我在 style.css 中与图像和悬停图像相关的代码。

#gallery_prettyphoto.portfolio a span
{
z-index: 2000;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 98%;
display: none;
cursor: pointer;
}

.portfolio .gallery_2columns a span.image_hover
{background: black url("images/gallery_hover/hover_image_big.png") no-repeat center center;
}

在我将主题更新到更新版本之前,一切都很好。我检查了 hover_image_big.png 是否丢失,没有,文件在那里。

最佳答案

这件事最近发生在我身上,我花了很长时间才找到解决方案,但事实证明你必须使用这样写的 css:

.portfolio .gallery_2columns a span.image_hover
{
background: black;
background: url("..images/gallery_hover/hover_image_big.png") no-repeat center center;

}

希望对您有所帮助!

关于css - 更新主题后悬停图像不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14792463/

相关文章:

html - 在菜单栏外悬停显示div

html - 将鼠标悬停在父级上而不覆盖子级背景

jquery - 如何向图像链接添加简单的反馈?

css 伪类不显示或悬停

javascript - 右键单击音频被禁用

html - 在 input 元素的内容上应用 CSS 样式

html - 仅悬停CSS时如何在背景图像之间切换?

html - 我的整个 div 是可点击的。当指针在div区域时,我可以在链接上制作悬停效果吗?

javascript - 数据表实现根本不起作用,Javascript/JQuery

javascript - Highcharts图表宽度动态显示大小