我需要将我的灯箱放置在图像的一部分上。我尝试添加这个CSS:
#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> </p>
<p> </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>现在我该如何定位图像在lightbox中显示的位置呢?
发布于 2011-10-26 16:40:19
您需要以fancybox-outer为目标
#fancybox-outer{
position:absolute;
left:170px;
top: 50px;
} https://stackoverflow.com/questions/7900152
复制相似问题