0
我正在使用演示Bootstrap Lightbox,我也是网络开发新手。 我无法使灯箱工作,在这种情况下,第一个图像是可见的,这显然是一个链接,但是当我点击它时,唯一显着的变化是网址从http://127.0.0.1:52595/index.html
变为http://127.0.0.1:52595/index.html#demoLightbox
,但页面停留一样。任何人都可以解释发生了什么或不发生什么?Bootstrap灯箱不弹出
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap 101 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-lightbox/0.6.1/bootstrap-lightbox.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-lightbox/0.6.1/bootstrap-lightbox.js">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<a data-toggle="lightbox" href="#demoLightbox" class="thumbnail">
<img src="shell_small.jpg" alt="Click to view the lightbox">
</a>
<div id="demoLightbox" class="lightbox hide fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class='lightbox-content'>
<img src="image.png">
<div class="lightbox-caption"><p>Your caption here</p></div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
那么这些都是很好的改变,但它看起来并没有改变任何东西 – EasilyBaffled
你是否看到控制台中的任何错误消息? – idmean
您是否在服务器上测试此文件?如果没有,则必须将'//cdnjs.cloudflare.com/ajax/libs/bootst...'更改为'http://cdnjs.cloudflare.com/ajax/libs/bootst ...' – idmean