Mã này hoạt động trên mọi trình duyệt khác mà tôi đã thử, ngoại trừ IE8.Z-index bị hỏng trong IE8?
IE8 dường như bỏ qua chỉ mục z - và cửa sổ bật lên trở thành cửa sổ bật xuống.
Ở đúng nơi, chỉ hiển thị bên dưới hình thu nhỏ.
Bất kỳ ai?
Cảm ơn!
HTML:
<a class="thumbnail" href="#thumb">
<img src="comic_a3_thumb.jpg" height="300" width="212" border="0"
style="float:right; margin-top:10px;margin-bottom:10px;"
alt="description" />
<span>
<img src="/images/comic_a3_popup.jpg" />
</span>
</a>
CSS:
.thumbnail{
position: relative;
z-index: 0;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
}
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: lightyellow;
padding: 5px;
left: 0px;
border: 1px dashed gray;
visibility: hidden;
color: black;
text-decoration: none;
}
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}
.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: -140px; /*position where enlarged image should offset horizontally */
left: -500px;
}
cảm ơn bạn - giải quyết được vấn đề! –