我在Fancybox中遇到多个图库的问题。我有4个图像,3个被CSS隐藏,一个是缩略图。当我点击缩略图时Fancybox启动正常并循环显示4张图像,但是当我到达最终图像而不是回到图像1时,它会重复图像4几次,然后最终转到图像1。
You can see the phenomenon here.(点击大白图片。)
以下是代码:
<div class="primary">
<figure>
<a class="fancybox" rel="group1" href="pics/street_1.png" title= "1 of 4: <strong>STREET SEEN
CATALOGUE</strong><br><em>216-PAGE, HARD-COVER, SMYTH-SEWN BOOK,
10.875 X 13.25 INCHES</em><br>Designed to accompany the exhibition Street Seen: The Psychological Gesture in American Photography
1940–1959 at the Milwaukee Art Museum. The exhibition focuses on the
work of six photographers, Lisette Model, Louis Faurer, Ted Croner,
Saul Leiter, William Klein, and Robert Frank during a pivital time in
American art, when global media was in its adolescence and photography
was just beginning to gain recognition in the art world."><img
src="pics/streetseen_s1.jpg" width="300" height="423"/>
<figcaption>
<h3>STREET SEEN CATALOGUE</h3>
<p>Salvia lomo leggings culpa. Gluten-free enim readymade butcher, trust fund magna est food truck laboris
8-bit.</p>
<img class="nopad" src="pics/cyan_squig_long_s1.gif">
<h4> PRINT </h4>
</figcaption>
</a>
</figure>
<div class="hidden">
<a class="fancybox" rel="group1" href="pics/street2_s1.jpg" title="2 of 4: <strong>STREET SEEN
CATALOGUE</strong>"</a>
<a class="fancybox" rel="group1" href="pics/street3_s1.jpg" title="3 of 4: <strong>STREET SEEN
CATALOGUE</strong>"</a>
<a class="fancybox" rel="group1" href="pics/street4_s1.jpg" title="4 of 4: <strong>STREET SEEN
CATALOGUE</strong>"</a>
</div>
</div>
答案 0 :(得分:1)
标记中存在错误(您缺少一些&gt; ):
<a class="fancybox" rel="group1" href="pics/street2_s1.jpg" title="2 of 4: <strong>STREET SEEN CATALOGUE</strong>"</a>
<a class="fancybox" rel="group1" href="pics/street3_s1.jpg" title="3 of 4: <strong>STREET SEEN CATALOGUE</strong>"</a>
<a class="fancybox" rel="group1" href="pics/street4_s1.jpg" title="4 of 4: <strong>STREET SEEN CATALOGUE</strong>"</a>
应该是
<a class="fancybox" rel="group1" href="pics/street2_s1.jpg" title="2 of 4: <strong>STREET SEEN CATALOGUE</strong>"></a>
<a class="fancybox" rel="group1" href="pics/street3_s1.jpg" title="3 of 4: <strong>STREET SEEN CATALOGUE</strong>"></a>
<a class="fancybox" rel="group1" href="pics/street4_s1.jpg" title="4 of 4: <strong>STREET SEEN CATALOGUE</strong>"></a>