2

在 Firefox 中,Fancybox 仅适用于最后一张图片(源中的最后一张图片,而不是视觉网页)。在 IE 中一切正常。

我将 ID 更改为 CLASS,但还没有成功。你可以在这里找到源代码: http ://www.luukratief-design.nl/dump/parallax/stack.html

请帮忙!烦我几个小时了。

4

1 回答 1

1

锚被定位在顶部。

要明白我的意思,打开 Firebug 的控制台并输入

$('a.big').css({ border: '6px solid red' })

现在看看上面的红色盒子。

我认为这是因为效果被添加到图像中,而不是父链接。图像正在使用 显示position: absolute,并且由于锚点没有position: relative,因此锚点像没有内容一样折叠。

既然你使用的是 JavaScript,你能做这样的事情吗?

$('a.big').click(function(event) {
    event.stopPropagation(); // in case it bubbles up the parent anchor somehow and fires twice in IE
    // trigger lightbox here..
    $(this).parent('a').click();
});

不确定这是否可行,但它可能在正确的轨道上......祝你好运。

于 2010-02-16T14:12:45.553 回答