我有以下代码,主要显示 4 个 div,每个 div 都Div
包含一个显示在图像下方的图像 + 文本,这是我的代码:
<div style="float: left;margin-left:9px">
<img style="height:90px;width:185px" src="*****.jpg" alt="ntitle">
<br>
<span style="font-size:9px"><a target="_blank" href="****">*****</a></span>
</div>
<div style="float: left;margin-left:9px">
<img style="height:90px;width:185px" src="*****.jpg" alt="ntitle">
<br>
<span style="font-size:9px"><a target="_blank" href="****">*****</a></span>
</div>
<div style="float: left;margin-left:9px">
<img style="height:90px;width:185px" src="*****.jpg" alt="ntitle">
<br>
<span style="font-size:9px"><a target="_blank" href="****">*****</a></span>
</div>
<div style="float: left;margin-left:9px">
<img style="height:90px;width:185px" src="*****.jpg" alt="ntitle">
<br>
<span style="font-size:9px"><a target="_blank" href="****">*****</a></span>
</div>
结果如下:
我想这样当用户将鼠标悬停在最后一个 Div 上时,它会在图像本身上显示一个箭头“>”以模仿用户可以显示接下来的 4 个项目。任何人都可以就我如何实现这一点提供建议吗?在这个阶段,我只需要添加一个虚拟箭头,没有别的。
现在在我的最后一个 div 中,我添加了一个名为class='profile-image'
:-
<div class="profile-image" style="float: left;margin-left:9px">
<img style="height:90px;width:185px" src="*****.jpg" alt="ntitle">
<br>
<span style="font-size:9px"><a target="_blank" href="****">*****</a></span>
</div>
然后我定义了以下CSS:-
.profile-image:hover .overlay {
position:absolute;
width: 48px;
height: 48px;
z-index: 100;
background: transparent url('/Resources/xt.png') no-repeat;
cursor: pointer;
}
但这没有任何效果......
谢谢