Jquery 未打开的fancybox图像下方的说明/标题

Jquery 未打开的fancybox图像下方的说明/标题,jquery,fancybox,Jquery,Fancybox,我有一个fancybox图库,我想在每个图像下面添加一个名称作为打开前的描述。不知什么原因,我搞不懂。 我的代码: 如果我试图在每张图片下方添加段落或其他内容,则会强制下一张图片换行 欢迎您的帮助,谢谢请详细说明相关代码示例,如果可能的话,请提供一个JSFIDLE来显示您到底想要什么 编辑:请查看此链接,因为它提供了一个简单的解决方案 在您的情况下,只需尝试将每个图像包含在一个div中,并将“float”css属性设置为“left” <div> <a class="fancyb

我有一个fancybox图库,我想在每个图像下面添加一个名称作为打开前的描述。不知什么原因,我搞不懂。 我的代码:

如果我试图在每张图片下方添加段落或其他内容,则会强制下一张图片换行


欢迎您的帮助,谢谢

请详细说明相关代码示例,如果可能的话,请提供一个JSFIDLE来显示您到底想要什么

编辑:请查看此链接,因为它提供了一个简单的解决方案

在您的情况下,只需尝试将每个图像包含在一个div中,并将“float”css属性设置为“left”

<div>
<a class="fancybox" href="images/fb1.jpg" data-fancybox-group="gallery" title="Automated Batching System">
<figure>
<img src="images/fb1_t.jpg" alt="Automated Batching System" class="imgrnd"/>   
<figcaption>Some title</figcaption>
</figure>
</a>
</div>

<div>
<a class="fancybox" href="images/fb1.jpg" data-fancybox-group="gallery" title="Automated Batching System">

<figure>
<img src="images/fb1_t.jpg" alt="Automated Batching System" class="imgrnd"  />
<figcaption>some Title</figcaption>
</figure></a>
</div>

希望这有帮助

答案应该是答案,你给出的是评论,所以请尝试在评论中发布它们。我的错,我试图发布评论,但错误地将其作为答案发布。这非常有效,谢谢,但突然之间图像之间的空间变大了,css保持不变。您可以尝试修改所涉及的各种标记的填充和边距,特别是figure标记,例如:figure{margin:5px;padding:5px;}不客气:如果满足您的查询,请将此标记为答案。代码在上面。我有一个15幅图片的图库,我想在访客点击图片之前看到的每幅图片下面添加一个描述。
<div>
<a class="fancybox" href="images/fb1.jpg" data-fancybox-group="gallery" title="Automated Batching System">
<figure>
<img src="images/fb1_t.jpg" alt="Automated Batching System" class="imgrnd"/>   
<figcaption>Some title</figcaption>
</figure>
</a>
</div>

<div>
<a class="fancybox" href="images/fb1.jpg" data-fancybox-group="gallery" title="Automated Batching System">

<figure>
<img src="images/fb1_t.jpg" alt="Automated Batching System" class="imgrnd"  />
<figcaption>some Title</figcaption>
</figure></a>
</div>
div
{
float:left;
}