我有一个页面全缩略图,让我们称他们为A,B,C等,他们铺设出像:其他图像下的图像是否有焦点(用于悬停)?
A,B,C,d,E,
F,G, H,I,J,
K,L,M,N ..等
当悬停在一个,它得到的z-index:1,扩大至2.5倍大小 - 因此,如果我们将鼠标悬停在A上,它放大&完全遮挡了B和F和G.
因此,接下来请参阅eg B中的一个必须从A的放大版本(在该点处与放大另一图像),然后将鼠标移动回到B.
因此大量筛选“闪蒸”等移开鼠标
是否有一种显示A的方式,但是当鼠标移离其左上部分时,(B)行中的下一个对焦点会放大。
我看了HTML的<area>
和<map>
标签,但没有成功。
目前我有:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>...</title>
<style type="text/css">
.figcaption {
color:green; display:block; min-width:120px;
}
.F1 {
float:left; width:120px; background:yellow; padding:0;margin:0;text-align:center; font-size:12px;
font-weight:bold;position:relative;vertical-align:bottom; }
.I1 {
float:left; width:100%;width:120px;height:107px;
}
.I1:hover { width:300px; height:auto;position: absolute; z-index:1; left:0px; top:0;}
/* cant get next line to work
.F1:hover > .I1 { width:300px; height:auto;position: absolute; z-index:1; left:0px; top:0;} cant get this to work
*/
.F1:hover + .figcaptionX { position: absolute;background:fuchsia; }
</style>
</head>
<body>
<div id="wrapper" style="width:600px;">
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf1.jpg?v=1345760446 " title=" Thomas Morris" /><br /><figcaption>DGF 1</figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf2.jpg?v=1345797337 " title=" New Orleans Owls - The Owls' Hoot " /> <figcaption>DGF 2</figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf03.jpg?v=1345797531 " title=" Johnny Dodds " /> <figcaption>DGF 3 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf04.jpg?v=1345797743 " title=" Tony Parenti " /> <figcaption>DGF 4 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf05.jpg?v=1345797920 " title=" Sizzling the Blues : New Orleans 1927-29 " /> <figcaption>DGF 5 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf06.jpg?v=1345798454 " title=" Dixieland Jug Blowers " /> <figcaption>DGF 6 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf07.jpg?v=1345798694 " title=" That's My Stuff : Chicago 1929-30 " /> <figcaption>DGF 7 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf08.jpg?v=1345798987 " title=" Hot Notes New York Volume 1 " /> <figcaption>DGF 8 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf09.jpg?v=1345799007 " title=" Chicago 1929-30 : Get Easy Blues " /> <figcaption>DGF 9 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf10.jpg?v=1345797064 " title=" Clifford Hayes " /> <figcaption>DGF10 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf11.jpg?v=1345797138 " title=" Thumpin' & Bumpin' : New York Volume 2 " /> <figcaption>DGF11 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf12.jpg?v=1345797166 " title=" Don't Leave Me Here : New York Volume 3 " /> <figcaption>DGF12 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf13.jpg?v=1345797205 " title=" Alexander, Where's that Band? " /> <figcaption>DGF13 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf14.jpg?v=1345797221 " title=" Dreaming the Hours Away : Clarence Williams Vol: 1 " /> <figcaption>DGF14 </figcaption></figure>
<figure class="F1"><img class="I1" src="http://cdn.shopify.com/s/files/1/0175/2200/products/dgf15.jpg?v=1345797241 " title=" Memphis Jug Band Volume 1 " /> <figcaption>DGF15 </figcaption></figure>
...</div> <!-- end of wrapper div -->
</body>
</html>
,如果需要,我可以使用JavaScript/JQuery的。
这看起来很奇怪。为什么只有在用户点击图片时才放大图片? – kol 2014-09-10 20:26:23
你应该考虑用JS来做这件事,当你有效的时候禁用任何动画并且稍后会有一些延迟。这将给用户足够的时间进行交互。你可以发布你的代码小提琴吗? – 2014-09-10 20:50:41
这可能会给你一些想法...也许在这里用setInterval或其他方式来检查原理,或者通过其他方式来检查光标下方的内容,因为它在整个展开的图像上移动。 http://stackoverflow.com/a/17978065/1998238 – wwwmarty 2014-09-10 20:56:45