我已经能够让 Fancybox 2 加载图像而没有任何问题。下面的代码让我可以点击图片barcode.gif
(
<?php require_once('common/inc/default.php'); ?>
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="common/css/default.css" />
<link rel="stylesheet" type="text/css" href="common/css/typography.css" />
<link href='http://fonts.googleapis.com/css?family=Droid+Sans|Lobster' rel='stylesheet' type='text/css'>
<!-- Add jQuery library -->
<script type="text/javascript" src="common/js/lib/jquery-1.8.2.min.js"></script>
<!-- Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="common/js/source/jquery.fancybox.js?v=2.1.3"></script>
<link rel="stylesheet" type="text/css" href="common/js/source/jquery.fancybox.css?v=2.1.2" media="screen" />
<link rel="stylesheet" type="text/css" href="common/js/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" />
<script type="text/javascript" src="common/js/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a#single_image").fancybox();
})
</script>
</head>
<body>
<div id="wrapper">
<header>
<div class="mast">Mighty Wash</div>
<div class="navigation">
<?=build_navigation();?>
</div>
</header>
<section id="main">
<a id="single_image" href="/common/img/barcode.gif"><img src="common/img/barcode.gif" /></a>
</section>
<footer>
</footer>
</div>
</body>
</html>
但是,当我尝试将谷歌地图嵌入 iframe 时,我什么也得不到。它只是导航到一个巨大的谷歌地图:
<?php require_once('common/inc/default.php'); ?>
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="common/css/default.css" />
<link rel="stylesheet" type="text/css" href="common/css/typography.css" />
<link href='http://fonts.googleapis.com/css?family=Droid+Sans|Lobster' rel='stylesheet' type='text/css'>
<!-- Add jQuery library -->
<script type="text/javascript" src="common/js/lib/jquery-1.8.2.min.js"></script>
<!-- Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="common/js/source/jquery.fancybox.js?v=2.1.3"></script>
<link rel="stylesheet" type="text/css" href="common/js/source/jquery.fancybox.css?v=2.1.2" media="screen" />
<link rel="stylesheet" type="text/css" href="common/js/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" />
<script type="text/javascript" src="common/js/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a.iframe").fancybox();
})
</script>
</head>
<body>
<div id="wrapper">
<header>
<div class="mast">Mighty Wash</div>
<div class="navigation">
<?=build_navigation();?>
</div>
</header>
<section id="main">
<a class="iframe" href="http://maps.google.com/?output=embed&f=q&source=s_q&hl=en&geocode=&q=London+Eye,+County+Hall,+Westminster+Bridge+Road,+London,+United+Kingdom&hl=lv&ll=51.504155,-0.117749&spn=0.00571,0.016512&sll=56.879635,24.603189&sspn=10.280244,33.815918&vpsrc=6&hq=London+Eye&radius=15000&t=h&z=17">Google maps (iframe)</a>
</section>
<footer>
</footer>
</div>
</body>
</html>
有任何想法吗?