Awesomes技术交流群:

lighterbox

A lighterweight gallery module for modern desktop and mobile browsers.

lighterbox

A lighterweight lightbox gallery module. A simple plugin supporting modern mobile and desktop browsers to minimize configuration and hacky code. Customizable.

Example

See an example here.

Usage

Download lighterbox and reference it after jQuery.

<script src="/js/libs/jquery/jquery.lighterbox.js"></script>

Or load via synchronous or asynchronous module definition.

All basic styling is set in the JS, however it would be easy to override using the class selectors.

HTML

<a href="https://s3.amazonaws.com/hensonism-art/paul-gauguin/gaugin3.jpg" class="lighterbox">
    <img src="https://s3.amazonaws.com/hensonism-art/paul-gauguin/thumbs/gaugin3.jpg" />
    <h2 class="lighterbox-title">Painting by Paul Gaugin</h2>
    <span class="lighterbox-desc">Oil on Canvas</span>
</a>

JavaScript

$(".lighterbox").lighterbox({ overlayColor : "white" });

Options

  • overlayColor : {string} "white" or "black" options set the theme. Default is white.
  • overlayOpacity : {string or integer} Any valid css value.
  • animateSpeed : {string or integer} Any valid css value.
lighterbox 相关推荐
对于该库,你有要推荐的内容么?点此提交推荐
请文明评论,与人为善,比聪明更重要!
评论