[已解决] Lightbox2及其同类产品 [英] [SOLVED] Lightbox2 and its ilk

查看:68
本文介绍了[已解决] Lightbox2及其同类产品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用FireFox 4.0:

昨晚我在玩Lightbox2,即使它与javascript位于同一文件夹中,我也无法使它加载控制图像(如loading.gif或closelabel.gif).我的网站层次结构的适用部分如下所示:

Using FireFox 4.0:

I was playing around with Lightbox2 last night, and I simply can''t get it to load the control images (like loading.gif or closelabel.gif), even if they''re in the same folder as the javascript. The applicable part of my site hierarchy looks like this:

root
    Lightbox (contains all lightbox js, css, and images with no sub-folders)
    MySubFolder
        masterpage.master (loads the lightbox js)
        Default.apsx (contains images that are be lightboxed)



载入了灯箱样式和javascript,并且图像按预期显示,但是图像周围的框架上没有闭合图像(closelabel.gif).如果将鼠标悬停在框架上的正确位置,则可以单击不可见的图像,然后窗口将返回到普通的预装灯箱视图.昨天我玩了大约两个小时,但无法显示图片.

这个问题导致我寻找Lightbox2的替代品.我想接下来要尝试ShadowBox,但我想知道是否还有其他人:

0)与Lightbox2有相同的问题

1)发现任何更好(重量更轻)的东西

2)ShadowBox的使用经验

3)为什么Lightbox2拒绝显示窗口控件图像的任何想法

我从Lightbox2开始,因为它在他们的IE8演示页上似乎可以正常工作,这是我在工作中必须使用的功能,但是当我回到家并将其实际放到网页中时,我遇到了上面提到的问题.我不认为这是因为我使用的是FF4,因为如果我没记错的话,他们的演示页可以很好地使用它.



The lightbox styles and javascript are loaded, and the image comes up as expected, but the frame around the image doesn''t have the close image (closelabel.gif) on it. If I hover the mouse in just the right place on the frame, I can click the invisible image, and the window returns to the normal pre-lightboxed view. I played around with it for about two hours yesterday, but could not get the image to show up.

This issue caused me to look for an alternative to Lightbox2. I think I want to try ShadowBox next, but I''m wondering if anyone else has:

0) had the same problem with Lightbox2

1) found anything that''s better (and lighter weight)

2) experience with ShadowBox

3) any idea why Lightbox2 refuses to show the window control images

I started with Lightbox2 because it appears to work fine on their demo page with IE8 which is what I have to use at work, but when I got home and actually put it into a web page, I had the problems cited above. I don''t think it''s because I''m using FF4, because if I remember correctly, their demo page worked fine with it.

推荐答案

,在与lightbox2进行了更多的战斗之后,我决定尝试使用shadowbox,并且shadowbox的广告效果没有任何变化,因此我改用了它.

一旦抱怨影子盒-由于所有变量和方法名称的长度均为一或两个字符,因此似乎已进行了某种混淆处理.这使得弄清楚这个家伙做了什么或修改代码以满足您自己的需求几乎是不可能的.当然也没有任何评论.

无论如何,如果其他人想探索灯箱技术的美好世界,那么这里的链接指向一个页面,其中列出了数十种不同的方法,几乎​​支持您可能会使用的所有JavaScript框架:

灯箱克隆 [ ^ ]

您唯一要做的就是查阅图表,然后选择最适合您需求的灯箱代码. FWIW,Shadowbox允许您选择框架和功能集,从而使您可以定制下载以及您真正想处理多少开销和依赖项.
Well, after fighting with lightbox2 some more, I decided to try shadowbox, and it worked as advertised without any changes, so I switched to that.

Once complaint about shadowbox - it appears as if some sort of obfuscation has been applied because all of the variables and method names are either one or two characters long. This makes it pretty much impossible to figure out what the guy did or modify the code to suit your own needs. Of course, there aren''t any comments either.

Anyway, if anyone else wants to explore the wonderful world of lightbox technology, here''s a link to a page that lists a few dozen different approaches, supporting pretty much any javascript framework you might happen to name:

Lightbox clones[^]

The only thing you really have to do is consult the chart, and pick the lightbox code that best fits your needs. FWIW, Shadowbox allows you to pick the framework and the feature set, thus allowing you to tailor your download and how much overhead and dependency crap you really want to deal with.


这篇关于[已解决] Lightbox2及其同类产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆