我完全不知所措.我把它减少到最简单的情况并通过W3c的验证器运行它,我仍然得到这个小的Fancybox窗口.我多次使用过Fancybox.看起来像这样:

页面在这里:http: //www.ericaspindler.com/private/
代码已经删除了所有其他JS和CSS,以便找到干扰.
整个文件:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Erica Spindler | Author</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/fancybox_new/jquery.fancybox-1.3.1.js"></script>
<link rel="stylesheet" type="text/css" href="../js/fancybox_new/jquery.fancybox-1.3.1.css" media="screen" />
<script type="text/javascript">
$(document).ready(function(){
$("#infolink").fancybox({});
$("#infolink").click();
});
</script>
</head>
<body>
<div id="fancy" style="display:none;">
<div style="width:500px; height:500px">
<img src="../g/video_Faulkner_Society_300.jpg" width="300" height="243" alt="" />
</div></div>
<a id="infolink" href="#fancy" class="infolink" style="display:none"></a>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
为了澄清,#fancy div的原始HTML内容被缩减为这一张图片.
还删除了我初始化的参数:
$(".infolink").fancybox({
'scrolling' : 'no',
'titleShow' : false,
'overlayOpacity' : '0.7'
});
Run Code Online (Sandbox Code Playgroud)
谁能告诉我我的错误?
本display: none应在设置家长要充当箱一格.请参阅 文档中的#4(内联内容).
所以id="fancy"像这样移动到子div:
<div style="display:none;">
<div style="width:500px; height:500px" id="fancy">
Run Code Online (Sandbox Code Playgroud)
这是一个例子.
| 归档时间: |
|
| 查看次数: |
1586 次 |
| 最近记录: |