开发人员应该知道的15个吸引力的jquery lightbox插件推荐

jQuery 是非常流行的JS框架,其俨然已成了开发者的必备工具,其中的jQuery Lightbox插件更是为广大开发者所喜爱。它惊人的特征之一是jQuery Lightbox插件有很多变化。你可以轻松地将任何简单的图片库,做成一个有吸引力和视觉感很强的界面效果,在设计界里面lighbox是使用最多的插件之一

所以,这里我收集了15个令人惊叹的jQuery的lightbox插件为你的下一个项目使用,他们给设计者提供了很多不同的展现形式,你可以尽情的根据自己的需要修改

jQuery Lightbox Plug-in

他是一个简单,强大基于jQuery开发的lightBox控件,你可以把mp3,视频,图片以这样的形式加载出来,非常不错

Lightview jQuery Plug-in

Highslide Lightbox Plug-in

Highslide JS这个Lightbox控件放置的内容不仅可以是图片,还可以是HTML页面、滚动的HTML页面 、通过AJAX加载的内容、iframe、flash。如果你想创建一个动态交互的内容,这个是不错的选择

Lightbox 2

Lightbox2基于Prototype和Scriptaculous开发,易于使用的Lightbox控件

PrettyPhoto

prettyPhoto是一款基于jquery的轻量级的lightbox图片特效脚本,它不仅支持图片,还同时支持视频、flash、 YouTube、iframe和ajax。而且prettyPhoto配置和使用都十分简单,扩展性也不错,你可以最大限度地自定义 prettyPhoto。prettyPhoto兼容大部分主流的浏览器,有些Wordpress图片插件就是基于此脚本制作的。

一、prettyPhoto使用方法介绍

1、引入jquery核心库和prettyPhoto插件库以及prettyPhoto样式表文件

1     <script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>   
2     <link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />   
3     <script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>  

2、初始化jquery插件,以下是最简单的配置的js代码

    $(document).ready(function(){   
        $("a[rel^='prettyPhoto']").prettyPhoto();   
    });  

下面是每种类型的html代码

1、单张图片

    <a href="images/fullscreen/2.jpg" rel="prettyPhoto" title="This is the description">   
    <img src="images/thumbnails/t_2.jpg" width="60" height="60" alt="This is the title" />   
    </a>  

2、图片相册

    <a href="images/fullscreen/1.jpg" rel="prettyPhoto[pp_gal]" title="You can add caption to pictures.">   
    <img src="images/thumbnails/t_1.jpg" width="60" height="60" alt="Red round shape" />   
    </a>   
    <a href="images/fullscreen/2.jpg" rel="prettyPhoto[pp_gal]">   
    <img src="images/thumbnails/t_2.jpg" width="60" height="60" alt="Nice building" />   
    </a>   
    <a href="images/fullscreen/3.jpg" rel="prettyPhoto[pp_gal]">   
    <img src="images/thumbnails/t_3.jpg" width="60" height="60" alt="Fire!" />   
    </a>   
    <a href="images/fullscreen/4.jpg" rel="prettyPhoto[pp_gal]">   
    <img src="images/thumbnails/t_4.jpg" width="60" height="60" alt="Rock climbing" />   
    </a>   
    <a href="images/fullscreen/5.jpg" rel="prettyPhoto[pp_gal]">   
    <img src="images/thumbnails/t_5.jpg" width="60" height="60" alt="Fly kite, fly!" />   
    </a>  

3、单个flash

    <a href="http://www.adobe.com/products/flashplayer/include/marquee/design.swf?width=792&amp;height=294"  
    rel="prettyPhoto[flash]" title="Flash 10 demo">   
    <img src="images/thumbnails/flash-logo.jpg" alt="Flash 10 demo" width="60" />   
    </a>  

4YouTube视频

    <a href="http://www.youtube.com/watch?v=qqXi8WmQ_WM" rel="prettyPhoto" title="">   
    <img src="images/thumbnails/flash-logo.jpg" alt="YouTube" width="60" />   
    </a>  

5、Vimeo

    <a href="http://vimeo.com/8245346" rel="prettyPhoto" title="">   
    <img src="images/thumbnails/flash-logo.jpg" alt="YouTube" width="60" />   
    </a>  

6、QuickTime影片

    <a title="Despicable Me" rel="prettyPhoto[movies]"  
    href="http://trailers.apple.com/movies/universal/despicableme/despicableme-tlr1_r640s.mov?width=640&height=360">   
    <img src="/wp-content/themes/NMFE/images/thumbnails/quicktime-logo.png" alt="Despicable Me" width="50" />   
    </a>   
    <a title="Tales from Earthsea" rel="prettyPhoto[movies]"  
    href="http://trailers.apple.com/movies/disney/talesfromearthsea/talesfromearthsea-tlr1_r640s.mov?width=640&height=340">   
    <img src="/wp-content/themes/NMFE/images/thumbnails/quicktime-logo.png" alt="Tales from Earthsea" width="50" />   
    </a>   
    <a title="Grease Sing-A-Long" rel="prettyPhoto[movies]"  
    href="http://trailers.apple.com/movies/paramount/greasesingalong/greasesingalong-tlr1_r640s.mov?width=640&height=272">   
    <img src="/wp-content/themes/NMFE/images/thumbnails/quicktime-logo.png" alt="Grease Sing-A-Long" width="50" />   
    </a>  

7、外部网站(iframe)

    <a href="http://www.google.com?iframe=true&width=100%&height=100%"  
    rel="prettyPhoto[iframes]" title="Google.com opened at 100%">Google.com</a>   
    <a href="http://www.apple.com?iframe=true&width=500&height=250" rel="prettyPhoto[iframes]">Apple.com</a>   
    <a href="http://www.twitter.com?iframe=true&width=400&height=200" rel="prettyPhoto[iframes]">Twitter.com</a>  

8、普通文本

    <a href="#inline-1" rel="prettyPhoto" ><img src="/wp-content/themes/NMFE/images/thumbnails/earth-logo.jpg" alt="" width="50" /></a>   
    <div id="inline-1" class="hide">   
        <p>这里是普通的文本</p>   
        <p>今天给大家介绍的prettyPhoto希望大家能喜欢,这个是播放普通文本的html</p>   
    </div>  

9、AJAX内容

    <a rel="prettyPhoto[ajax]" href="/demos/prettyPhoto-jquery-lightbox-clone/xhr_response.html?  
    ajax=true&width=325&height=185">Ajax content</a>  

 

Pirobox Extended V.1.0.

采用jQuery开发的Lightbox控件。能够根据浏览器窗体大小自动调整展示图片大小。提供向前/向后控制链接。动态加载图片效果。易于定制。

GreyBox

GreyBox是一个遮罩层的组件也称模式窗口或模态窗口(所谓模态窗口,就是指除非采取有效的关闭手段,用户的鼠标焦点或者输入光标将一直停留在其上的窗口),它运行以后可以产生不错的界面。类似于thinkbox,lightbox等。用于以一种别致的模式对话框方式展示页面,图片或者其它内容。这是它的官网:http://orangoo.com/labs/GreyBox/

Slimbox 2 jQuery Lightbox Plugin

WordPress jQuery Lightbox Plugin

Litebox jQuery Plugin

ColorBox

Shadowbox jQuery Lightbox Plugin

Dialog

Flexible Lightbox

Basic Beginners’ Guide to Installing a jQuery Lightbox

 

你可能还喜欢:

posted @ 2012-09-17 13:45  创想中国(羲闻)  阅读(6021)  评论(16编辑  收藏  举报