jQuery 有没有很轻的灯箱可用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2293520/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a VERY light-weight lightbox available?
提问by ExodusNicholas
I'm looking for an extremely light-weight lightbox for jQuery. i'm trying to create my own but i suck and my fist is about to go through the screen.... i'm talking like 5kb or less.. i know it can be done, and if i knew what i was doing i'd do it... but i'm just done for the day. So, does anyone know of one? something just for images, and nothing else, no fancy crap, no extra weight, one that simply centers the lightbox in the center of the screen with whatever picture was loaded by the link.
我正在为 jQuery 寻找一个非常轻量级的灯箱。我正在尝试创建自己的,但我很糟糕,我的拳头即将穿过屏幕......我说的是 5kb 或更少......我知道它可以做到,如果我知道我在做什么我会做的...但我刚刚完成了这一天。那么,有人知道吗?仅用于图像的东西,没有其他东西,没有花哨的废话,没有额外的重量,只需将灯箱与链接加载的任何图片放在屏幕中央即可。
采纳答案by Sampson
There are many options. Check out Rounding Up the Top 10 jQuery Lightbox Scripts.
有很多选择。查看10 大 jQuery Lightbox 脚本四舍五入。
回答by leon
回答by Andrew
If you dont need any Ajax support then the lightest Lightbox out there is: Modal Lightbox http://dev.iamntz.com/52/jquery-modal-lightbox-alternative
如果您不需要任何 Ajax 支持,那么最轻的灯箱是:Modal Lightbox http://dev.iamntz.com/52/jquery-modal-lightbox-alternative
回答by vkGunasekaran
回答by Simon East
Slimbox 2is my favourite lightweight lightbox script - it's only 4kb and doesn't even need code to initiate it, you simply embed the script/CSS and add rel="lightbox"
to your <A>
tags.
Slimbox 2是我最喜欢的轻量级灯箱脚本 - 它只有 4kb,甚至不需要代码来启动它,您只需嵌入脚本/CSS 并添加rel="lightbox"
到您的<A>
标签中。
回答by Hogan
It lets you pick the items you want and delivers a js file that just does that...
它可以让你选择你想要的项目并提供一个 js 文件来做这件事......
Still about 22k for images...
图像仍然约为 22k...