【问题标题】:Image does not show up (Lightbox)图片未显示(灯箱)
【发布时间】:2013-05-13 08:09:01
【问题描述】:

灯箱不起作用。单击拇指后,页面变暗,但没有弹出图像。可能是什么问题?

头部:

<link href="/inc/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="/inc/bootstrap/fontawesome/font-awesome.min.css" rel="stylesheet">
<link href="/inc/css/style.css" rel="stylesheet">
<link href="/inc/lightbox/css/lightbox.css" rel="stylesheet" />

代码:

<a href="image.png" rel="lightbox" title="Some title"><img src="image-thumb.png"></a>

就在&lt;/body&gt;之前:

<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script src="/inc/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/inc/lightbox/js/lightbox.js" type="text/javascript"></script>

【问题讨论】:

  • 不,控制台中没有任何内容。
  • 尝试在head部分设置此脚本并查看结果
  • 您是否尝试过滚动到底部或缩小页面?我想我过去曾遇到过这个问题,而图像恰好位于所有内容的下方。如果是,则可能是样式问题。

标签: jquery lightbox


【解决方案1】:

我已经解决了这个问题。 不要使用最新版本的 jquery,而是使用 1.7.2 版本,就像他们在灯箱网站示例中使用的那样。

【讨论】:

    猜你喜欢
    • 2012-07-29
    • 1970-01-01
    • 1970-01-01
    • 2015-07-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-06
    • 2015-03-21
    相关资源
    最近更新 更多