我正在创建带有超链接图像和文本的缩略图,并且应该显示鼠标悬停 div 内容,到目前为止,鼠标悬停工作正常,因为我不擅长 CSS。我无法使用 span 获取图像下方的文本。另请参阅 www.ge.com 页面右侧“查看更多故事”下的参考资料,我想在我的网站上复制它,请帮忙。
<a href="" class="nav-holder-link">
<img width="67" height="51" class="nav-header-image" src="images/img1.jpg" alt="" />
<span class="nav-holder-text">moving</span>
<div class="nav-holder-preview">
<img width="305" height="100" src="images/img1.jpg" alt="" />
<p style="position:absolute;top:55px;padding-left:10px;padding-right:10px">Powered by GE locomotives, the Juice Train is bringing Orange Juice to your breakfast table in one of the most efficient ways possible.</p>
</div>
</a>
<a href="" class="nav-holder-link">
<img width="67" height="51" class="nav-header-image" src="images/img2.jpg" alt=""/>
<span class="nav-holder-text">Watch</span>
<div class="nav-holder-preview">
<img width="305" height="100" src="images/img2.jpg" alt="" />
<p style="position:absolute;top:55px;padding-left:10px;padding-right:10px">Watch this time lapse as the Tropicana/CSX Juice Train, powered by two 4,400 HP GE </p>
</div>
</a>