响应式的图片 Lightbox 插件:ImageLightbox.js

jopen 10年前

ImageLightbox.js是一个简约的,可扩展和可配置性,响应性和触摸友好的iOS,Android和Windows Phone兼容灯箱插件。默默的预加载下一个图像,使用CSS转换和过渡,利用键盘进行交互。

Features

  1. Ascetic. No captions, navigation buttons or background cover by default. Nothing that would distract user from the main purpose. That’s why I enjoy pointing out Jony Ive’s observation: An indicator has a value when it’s indicating something, but if it’s not indicating something, it shouldn’t be there”. I think it is the most common thing that designers forget to solve.
  2. Minimalistic. No bunch of default raster image files that fail on higher resolution screens. Just one source file which is only 4kb in size when minified.
    No messy markup. Just one simple element – <img>.
  3. Extensible & configurable. If the default functionality is not enough, you can easily extend the plugin with custom JavaScript functions, change the settings or use a couple of useful method functions.
  4. Responsive and touch-friendly. The most trending topics in web design and they are here. Images fit to any screen size and are swipe-able (native behavior) on touch capable devices.
  5. iOS, Android and Windows Phone compatible. As well as desktop versions of Safari, Chrome, Firefox, Opera and Internet Explorer.
  6. jQuery 1.x and 2.x compatible. Quite clear, isn’t it?
  7. Preloads next image. While user is viewing the current picture, the plugin silently preloads the next picture which shows up without any delay when respective action is triggered.
  8. Uses CSS transform and transition for moving images. Turns out CSS’s transform performs better than left (as well as right, top, bottom). But the plugin falls back on left if a browser does not support transform.
  9. Interacts with keyboard. Standard, but essential Arrow Left, Arrow Right to switch images and Esc to quit the lightbox.
image-lightbox.jpg

项目主页:http://www.open-open.com/lib/view/home/1410696423523

</span>