我正在尝试创建一个打开iframe窗口的fancybox。该窗口将包含以HTML格式创建的文章,并与主页面放在同一文件夹中。出于某种原因,我无法让它发挥作用。它不会打开一个窗口,而是在一个新选项卡中打开。如果您需要更多信息,请告诉我们,并感谢您的帮助!我的代码如下:
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="webfont/styles.css" />
<link rel="stylesheet" type="text/css" media="screen and (max-width: 749px)" href="main-phone.css" />
<link rel="stylesheet" type="text/css" media="screen and (min-width: 750px) and (max-width: 1099px)" href="main-thin.css" />
<link rel="stylesheet" type="text/css" media="screen and (min-width: 1100px)" href="main-wide.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript">!window.jQuery && document.write('<script src="/jquery-1.4.3.min.js"><\/script>');</script>
<script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="/fancybox/jquery.easing-1.3.pack.js"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
<script type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox({
maxWidth : 960,
maxHeight : 540,
minWidth : 480,
minHeight : 320,
fitToView : false,
width : '80%',
height : '80%',
autoSize : false,
closeClick : false,
openEffect : 'elastic',
closeEffect : 'none'
});
});
</script>
</head>
<body id="index">
<div id="container">
<!-- START ROW 1 -->
<div id="wrap1">
<div id="wrapa">
<div class="box1">
<h2>Article stuff</h2>
<a href="test.html" class="fancybox fancybox.iframe" title="article 1">READ ARTICLE</a>
</div>
<div class="box2">
<h2>Lore ipsum</h2>
</div>
<div class="box3">
<h2>Lore ipsum</h2>
</div>
</div>
</div>
<!-- END ROW 1 -->`