单击时,Fancybox关闭按钮消失

我目前正在使用fancybox版本2.1.5,我遇到的问题是当我点击iframe上的关闭按钮“x”时,关闭按钮“x”消失而不是关闭iframe。 有没有其他人在使用fancybox时遇到此错误? 请访问此页面并单击“详细信息”,然后单击关闭按钮“x”以体验错误。 http://www.jerrellkbryant.com/jbcom/portfolio

 jQuery(document).ready(function(){ $(".various").fancybox({ type :'iframe', scrolling : 'no', maxWidth : 800, maxHeight : 400, fitToView : true, width : '70%', height : '70%', autoSize : false, closeClick : true, openEffect : 'none', closeEffect : 'none', }); 

一般来说,设置一般的CSS规则并不是一个好主意。

在你的样式 css文件中你有这些规则(从第286行)

 a{text-decoration:none; color:#393631} a:visited{/*opacity:0.8; */ /* A bit basic,but it's a bare minumum... */} a:hover{text-decoration:none; /*background:#c1f4e3;*/ color:#393631} a:active, a:focus{position:relative; top:1px; outline:none} 

这会影响fancybox关闭按钮(这是一个锚点)的位置

请使用一些特异性,以便只有您定位的那些受到影响:

 #content a{text-decoration:none; color:#393631} #content a:visited{/*opacity:0.8; */ /* A bit basic,but it's a bare minumum... */} #content a:hover{text-decoration:none; /*background:#c1f4e3;*/ color:#393631} #content a:active, #content a:focus{position:relative; top:1px; outline:none}