我真的被卡住了..现在一直坐在这个代码上..尝试用 ColorBox 制作一个画廊,看起来很不错..我只有一个问题..使用 iframe 时我无法让它成为一个组...
http://www.lani.dk/thomas/temp/iframe_problem.zip
地点
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>-</title>
<link media="screen" rel="stylesheet" href="css/colorbox.css" />
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.colorbox.js"></script>
<script>
function showColorBox(imageURL) {
$.fn.colorbox({ opacity: .6, open: true, href: imageURL });
}
</script>
</head>
<body>
<iframe src="iframe.asp" name="iframename" width="400" height="400" frameborder='0' id="iframename">
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>
框架
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>-</title>
<style type="text/css">
body {
background-color: #999;
}
</style>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.colorbox.js"></script>
<script>
$(document).ready(function () {
$('a.colorbox').click(function (event) {
event.preventDefault();
parent.showColorBox($(this).attr("href"));
});
});
</script>
</head>
<body>
<p><a href="images/gallery/pic1.jpg" class="colorbox" rel="group1">pic1</a></p>
<p><a href="images/gallery/pic2.jpg" class="colorbox" rel="group1">pic2</a></p>
<p><a href="images/gallery/pic3.jpg" class="colorbox" rel="group1">pic2</a></p>
</body>
</html>