我在表格中创建了缩略图和描述字段。缩略图具有覆盖相邻文本但不覆盖相邻缩略图的跨度图像???(所有内容都包含在#divSparesItem 中) 我已经尝试按照其他讨论中的建议向css 添加z-index 和显示变体,但似乎没有任何东西可以解决问题。有人可以帮忙吗?
HTML:
<table>
<tr>
<td><a class="thumbnail" href="#thumb"><img src="Design/Spares Image Thumbnail.png" width="80" height="60" alt="Spare I"/><span><img src="Design/Spares Image Large.png" width="320" height="240" alt="Spare I"/><br/>Spare I</span></a><p>CODE: 123ABC<br/>Description: Donec egestas justo ut nulla congue bibendum.<br/><font color="#FF0000">Price</font></p></td>
<td><a class="thumbnail" href="#thumb"><img src="Design/Spares Image Thumbnail.png" width="80" height="60" alt="Spare I"/><span><img src="Design/Spares Image Large.png" width="320" height="240" alt="Spare II"/><br/>Spare II</span></a><p>CODE: 123ABC<br/>Description: Donec egestas justo ut nulla congue bibendum.<br/><font color="#FF0000">Price</font></p></td>
<td><a class="thumbnail" href="#thumb"><img src="Design/Spares Image Thumbnail.png" width="80" height="60" alt="Spare III"/><span><img src="Design/Spares Image Large.png" width="320" height="240" alt="Spare I"/><br/>Spare III</span></a><p>CODE: 123ABC<br/>Description: Donec egestas justo ut nulla congue bibendum.<br/><font color="#FF0000">Price</font></p></td>
</tr>
</table>
CSS:
#divSparesItem {
color:#CCC;
text-align:left;
font-size:0.8em;
float:right;
padding-top:10px;
padding-left:25px;
padding-right:25px;
text-decoration:none;
}
#divSparesItem img {
float:left;
margin-top:2px;
margin-right:15px;
margin-bottom:10px;
border-left:#000;
border-top:#000;
border-right:#999;
border-bottom:#999;
border-width:1px;
border-style:solid;
}
.thumbnail {
position:relative;
z-index:0;
}
.thumbnail span{
position:absolute;
background-color:#333;
padding-top:15px;
padding-left:15px;
padding-right:0px;
padding-bottom:15px;
border-left:#999;
border-top:#999;
border-right:#000;
border-bottom:#000;
border-width:1px;
border-style:solid;
visibility:hidden;
color:#CCC;
text-decoration:none;
}
.thumbnail span img{
border:none;
z-index:100;
}
.thumbnail:hover span{
display:block;
visibility:visible;
background-color:#333;
top:-115px;
left:0;
}
您可以在此处查看问题(单击 Benelli1 选项卡)。任何建议将不胜感激!