我目前有HTML编写的CSS代码,这样当您将鼠标悬停在其中一个缩略图上时,会在拇指钉图像上方弹出一个较大的图片。我现在有两个问题:用于弹出图片和悬停的CSS
1)我怎么能有上述缩略图默认的白色空间到第一个缩略图的图片
2)我怎样才能得到的图片,“熬夜”他们有后被徘徊在这样的地方,它们将只会消失,除非另一个缩略图被搁置。即使鼠标进入白色空间,仍应显示最后一个悬停图像。
我的网站可以在这里与图像显示器被发现在顶部www.ignitionspeed.com 还有什么我找如果不清楚可以在这里autoblog.com
在这里找到一个很好的例子是我使用的CSS这
<style type="text/css">
.thumbnail{
z-index: 0;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
}
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
display: block;
left: -1000px;
visibility: hidden;
color: red;
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: 10px;
left: 13px; /*position where enlarged image should offset horizontally */
overflow:hidden;
}
</style>
这里是HTML
<a class="thumbnail" href="http://www.ignitionspeed.com/2012/09/lexus-lf-cc-concept.html"><img src="http://i.tinyuploads.com/25rBVR.jpg" width="117px" height="72px" border="0" /><span><img src="http://i.tinyuploads.com/25rBVR.jpg" /><br /></span></a>
<a class="thumbnail" href="http://www.ignitionspeed.com/2012/09/2009-bmw-m3-review-test-drive.html" ><img src="http://i.tinyuploads.com/IGoDa8.jpg" width="117px" height="72px" border="0" /><span><img src="http://i.tinyuploads.com/IGoDa8.jpg" /><br /></span></a>
<a class="thumbnail" href="http://www.ignitionspeed.com/2012/09/2013-audi-s6-giant-leap-in-performance.html"><img src="http://i.tinyuploads.com/aSwPv9.jpg" width="117px" height="72px" border="0" /><span><img src="http://i.tinyuploads.com/aSwPv9.jpg" /><br /></span></a>
<a class="thumbnail" href="http://www.ignitionspeed.com/2012/09/2012-lexus-lfa.html"><img src="http://i.tinyuploads.com/Gu1Pey.jpg" width="117px" height="72px" border="0" /><span><img src="http://i.tinyuploads.com/Gu1Pey.jpg" /><br /></span></a>
<a class="thumbnail" href="http://www.ignitionspeed.com/2012/08/acura-nsx-future-is-already-here.html"><img src="http://i.tinyuploads.com/VJo9IP.jpg" width="117px" height="72px" border="0" /><span><img src="http://i.tinyuploads.com/VJo9IP.jpg" /><br /></span></a>
<a class="thumbnail" href="http://www.ignitionspeed.com/2012/09/2012-jaguar-xkr-s.html"><img src="http://i.tinyuploads.com/REiZ6c.jpg" width="117px" height="72px" border="0" /><span><img src="http://i.tinyuploads.com/REiZ6c.jpg" /><br /></span></a>
非常感谢!
有一些技术演示埃里克迈耶通过创建与下面的纯CSS弹出式菜单涵盖了类似的任务:HTTP: //meyerweb.com/eric/css/edge/popups/demo.html和http://meyerweb.com/eric/css/edge/popups/demo2.html(含图片)。 – feeela
如果解决方案使用java-script/jquery,您会感到安心吗? – krish
你需要使用JavaScript。创建一个默认第一张图片的悬停事件,当缩略图失焦时。 –