1

我使用的是 Galleria 1.2 版本,我知道它有点过时了,我遇到了 IE7 和 IE8 的问题。FireFox 工作正常。我尝试升级到 1.2.2,但遇到了其他问题,由于时间限制,我稍后将不得不处理这些问题。

问题是灯箱的背景打开了黑色而不是 50% 的不透明度。如果我再次单击图像,灯箱会正确打开。

第一次点击:

在此处输入图像描述

第二次点击:

在此处输入图像描述

我的代码:

<script type="text/javascript" src="~/content/js/galleria.js"></script>
<script type="text/javascript">Galleria.loadTheme('~/content/css/Galleria/galleria.classic.js');</script>


$('#imageGallery').galleria({ 
    debug: true,
    width: 300,
    height: 225,
    showInfo: false,
    showCounter: false,
    showImagenav: false,
    data_source: data,
    on_image: function(image, thumb) {
        var gallery = this;
        $(image).click( function() {
            gallery.openLightbox();

            });
            }

}); 

这是使用 Fiddler 的页面请求,它似乎显示了正在加载的 css 文件:

在此处输入图像描述

如果我在加载组件之前自己加载 css,我会得到:

在此处输入图像描述

我不知道如何解决它。

谢谢!

4

2 回答 2

0

尝试<script type="text/javascript" src="~/content/js/galleria.js"></script>在 CSS 已加载后加载。

于 2011-03-17T01:03:56.663 回答
0

升级到最新版本的 Galleria 解决了这个问题。但是,它引入了一些新的。:(

于 2011-03-22T23:11:15.480 回答