位置灯箱 - Fancybox

问题描述:

我需要将我的灯箱放置在图像的一部分上。我试图添加这个CSS:位置灯箱 - Fancybox

#globe{ 
position:absolute; 
left:170px; 
top: 50px; 
} 

当我这样做,它打破了灯箱。我如何定位灯箱? (我用的fancybox)这里是我的HTML:

<p><a id="fancy" href="#globe"><img class="center" style="width:620px;" 
src="/messages4u/2011/images/october/baby-n-grandfather.jpg" /></a></p> 
<p>&nbsp;</p> 
<p>&nbsp;</p> 
<div class="hide"><div id="globe"> 
<img src="/messages4u/2011/images/october/globe-text.png" width="400" 
height="400" /></div></div> 

<script type="text/javascript"> 
var $j = jQuery.noConflict(); 
$j(document).ready(function() { 
$j("a#fancy").fancybox({ 
    'padding' : 0, 
    'overlayShow' : false, 
}); 
}); 
</script> 

现在我该怎样图像位置,我希望它显示在灯箱吗?

+0

您更改的条目,被它现在的工作,做了的fancybox来了吗?你只是想把它放在别的地方呢? – 2011-10-26 08:33:54

+0

是的CSS导致它打破并不显示。修正了所以我重新提出问题,问我关于我的下一个问题,那就是如何定位灯箱。 – L84

+0

你的意思是你想只显示特效部分的图像效果? – coder

您的需要为目标的fancybox,外

#fancybox-outer{ 
position:absolute; 
left:170px; 
top: 50px; 
} 
+0

它实际上是#fancybox包装。我现在知道了=> – L84

+1

也Lynda,你可以重写你的jQuery代码到这个:jQuery(function(){ $(“a#fancy”)。fancybox({padding':0, 'overlayShow ':false }); }); – 2011-10-26 08:43:11