我在我的网站中使用Lightbox,以便用户可以以更大的尺寸查看我的图像,并且出于某些奇怪的原因,控件将不会显示。无法弄清楚原因是什么。尝试将我的代码与演示网站上的代码进行比较,但无法弄清楚我做错了什么。我能想到的最好的可能是我不小心用CSS重置了吗?
<script src="js/lightbox-plus-jquery.js">
lightbox.option({
'wrapAround': true,
'alwaysShowNavOnTouchDevices': true,
'showImageNumberLabel': true,
})
</script>
/* CSS Reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/*End CSS Reset */
body {
max-width: 100%;
margin: 0;
font-size: 16px;
background-color: #fff;
color: #000;
font-family: 'Lato', sans-serif;
}
a {
text-decoration: none;
color: #555;
}
p {
text-align: center;
}
/* Nav Bar Styles */
nav {
text-align: right;
width: 100%;
background-color: #fff;
font-size: 1.4em;
padding: 0;
padding-top: .5%;
padding-bottom: .6%;
}
ul {
padding-right: 2%;
}
.navigation {
display: inline;
margin: .5%;
}
.logo {
color:#000;
display: inline;
float: left;
margin: 0 0 0 1%;
}
/* Footer */
footer {
text-align: center;
padding-top: 2%;
padding-bottom: .5%;
font-size: 79%;
color: #000;
background-color: #fff;
clear: left;
}
.imageGrid {
width: 100%;
display: block;
text-align: center;
}
.images {
width: 10%;
}
.categories {
font-size: 1.4em;
text-align: center;
padding-top: 2%;
padding-bottom: 1%;
}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Brian Funderburke Photography & Design</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/sitewide.css">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/photography.css">
<link href="css/lightbox.css" rel="stylesheet">
</head>
<body>
<header>
<nav>
<h1 class="logo">B.Fun Photography & Design</h1>
<ul>
<li class="navigation"><a href="home.html">Home</a></li>
<li class="navigation"><a href="photography.html">Photography</a></li>
<li class="navigation"><a href="design.html">Design</a></li>
<li class="navigation"><a href="about.html">About</a></li>
<li class="navigation"><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<h2 class="categories">Landscapes</h2>
<div class="imageGrid">
<a href="http://www.alsogroup.org/default/assets/File/Help2-700x394.jpg" data-lightbox="image-1" data-title="Blue Ridge Sunset"><img src="http://www.alsogroup.org/default/assets/File/Help2-700x394.jpg" alt="Blue Ridge Sunset" class="images"></a>
<a href="http://www.alsogroup.org/default/assets/File/Help2-700x394.jpg" data-lightbox="image-1" data-title="Duality"><img src="http://www.alsogroup.org/default/assets/File/Help2-700x394.jpg" alt="Duality" class="images"></a>
<a href="http://www.alsogroup.org/default/assets/File/Help2-700x394.jpg" data-lightbox="image-1" data-title="Elakala Falls"><img src="http://www.alsogroup.org/default/assets/File/Help2-700x394.jpg" alt="Elakala Falls" class="images"></a>
<a href="img/m.jpg" data-lightbox="image-1" data-title="Methuselah"><img src="img/thumbs/m.jpg" alt="Methuselah" class="images"></a>
<a href="img/occ.jpg" data-lightbox="image-1" data-title="Old City Cemetary"><img src="img/thumbs/occ.jpg" alt="Old City Cemetary" class="images"></a>
<a href="img/mk.jpg" data-lightbox="image-1" data-title="Mcafee's Knob"><img src="img/thumbs/mk.jpg" alt="Mcafee's Knob" class="images"></a>
<a href="img/af.png" data-lightbox="image-1" data-title="Appalachian Farmland"><img src="img/thumbs/af.jpg" alt="Appalachian Farmland" class="images"></a>
<a href="img/bf.jpg" data-lightbox="image-1" data-title="Blackwater Falls"><img src="img/thumbs/bf.jpg" alt="Blackwater Falls" class="images"></a>
<a href="img/dh.jpg" data-lightbox="image-1" data-title="Dark Hollows Falls"><img src="img/thumbs/dh.jpg" alt="Dark Hollows Falls" class="images"></a>
<a href="img/ef2.jpg" data-lightbox="image-1" data-title="Elakala Falls"><img src="img/thumbs/ef2.jpg" alt="Elakala Falls" class="images"></a>
<a href="img/hr.jpg" data-lightbox="image-1" data-title="Humpback Rocks"><img src="img/thumbs/hr.jpg" alt="Humpback Rocks" class="images"></a>
<a href="img/lp.jpg" data-lightbox="image-1" data-title="Lindy Point"><img src="img/thumbs/lp.jpg" alt="Lindy Point" class="images"></a>
<a href="img/lps.jpg" data-lightbox="image-1" data-title="Lindy Point Sunset"><img src="img/thumbs/lps.jpg" alt="Lindy Point Sunset" class="images"></a>
<a href="img/to.jpg" data-lightbox="image-1" data-title="The Overlook"><img src="img/thumbs/to.jpg" alt="The Overlook" class="images"></a>
<a href="img/golyat.png" data-lightbox="image-1" data-title="Golyat"><img src="img/thumbs/golyat.jpg" alt="Golyat s" class="images"></a>
</div>
<h2 class="categories">Weddings</h2>
<div class="imageGrid">
<a href="img/weddings/sweeny/beforeFirstLook.jpg" data-lightbox="image-2" data-title="#"><img src="img/thumbs/br.jpg" alt="Blue Ridge Sunset" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="#"><img src="img/thumbs/duality.jpg" alt="Duality" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Elakala Falls"><img src="img/thumbs/ef.jpg" alt="Elakala Falls" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Methuselah"><img src="img/thumbs/m.jpg" alt="Methuselah" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Old City Cemetary"><img src="img/thumbs/occ.jpg" alt="Old City Cemetary" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Mcafee's Knob"><img src="img/thumbs/mk.jpg" alt="Mcafee's Knob" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Appalachian Farmland"><img src="img/thumbs/af.jpg" alt="Appalachian Farmland" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Blackwater Falls"><img src="img/thumbs/bf.jpg" alt="Blackwater Falls" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Dark Hollows Falls"><img src="img/thumbs/dh.jpg" alt="Dark Hollows Falls" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Elakala Falls"><img src="img/thumbs/ef2.jpg" alt="Elakala Falls" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Humpback Rocks"><img src="img/thumbs/hr.jpg" alt="Humpback Rocks" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Lindy Point"><img src="img/thumbs/lp.jpg" alt="Lindy Point" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="Lindy Point Sunset"><img src="img/thumbs/lps.jpg" alt="Lindy Point Sunset" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-2" data-title="The Overlook"><img src="img/thumbs/to.jpg" alt="The Overlook" class="images"></a>
</div>
<h2 class="categories">Other</h2>
<div class="imageGrid">
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="#"><img src="img/thumbs/br.jpg" alt="Blue Ridge Sunset" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="#"><img src="img/thumbs/duality.jpg" alt="Duality" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Elakala Falls"><img src="img/thumbs/ef.jpg" alt="Elakala Falls" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Methuselah"><img src="img/thumbs/m.jpg" alt="Methuselah" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Old City Cemetary"><img src="img/thumbs/occ.jpg" alt="Old City Cemetary" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Mcafee's Knob"><img src="img/thumbs/mk.jpg" alt="Mcafee's Knob" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Appalachian Farmland"><img src="img/thumbs/af.jpg" alt="Appalachian Farmland" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Blackwater Falls"><img src="img/thumbs/bf.jpg" alt="Blackwater Falls" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Dark Hollows Falls"><img src="img/thumbs/dh.jpg" alt="Dark Hollows Falls" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Elakala Falls"><img src="img/thumbs/ef2.jpg" alt="Elakala Falls" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Humpback Rocks"><img src="img/thumbs/hr.jpg" alt="Humpback Rocks" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Lindy Point"><img src="img/thumbs/lp.jpg" alt="Lindy Point" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="Lindy Point Sunset"><img src="img/thumbs/lps.jpg" alt="Lindy Point Sunset" class="images"></a>
<a href="img/weddings/#.jpg" data-lightbox="image-1" data-title="The Overlook"><img src="img/thumbs/to.jpg" alt="The Overlook" class="images"></a>
</div>
<footer>
<p>© 2016 Brian Funderburke. All Rights Reserved.</p>
</footer>
<script src="js/lightbox-plus-jquery.js">
lightbox.option({
'wrapAround': true,
'alwaysShowNavOnTouchDevices': true,
'showImageNumberLabel': true,
})
</script>
</body>
</html>