0712-2888027 189-8648-0214
微信公眾號(hào)

孝感風(fēng)信網(wǎng)絡(luò)科技有限公司微信公眾號(hào)

當(dāng)前位置:主頁 > 技術(shù)支持 > Javascript/JQuery > Fancybox是一款基于jquery開發(fā)的類Lightbox插件

Fancybox是一款基于jquery開發(fā)的類Lightbox插件

時(shí)間:2024-09-19來源:風(fēng)信官網(wǎng) 點(diǎn)擊: 1044次
Fancybox是一款基于jquery開發(fā)的類Lightbox插件。支持對(duì)放大的圖片添加陰影效果,對(duì)于一組相關(guān)的圖片添加導(dǎo)航操作按紐。Fancybox 是一款很絢麗的 jquery 彈出層展示插件,該lightbox除了能夠展示圖片之外,還可以展示iframed內(nèi)容, 通過css自定義外觀。
Fancybox是一款基于jquery開發(fā)的類Lightbox插件
 
官方網(wǎng)站:http://www.fancybox.net/home
 
下載地址:https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/fancybox/jquery.fancybox-1.3.4.zip
 
使用示例:
 
1、引入Jquery文件
 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
 
2、引入Fancybox樣式文件
 
<link rel="stylesheet" href="/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
 
3、在需要使用Fancybox的圖片中加上屬性
 
<a class="grouped_elements" rel="group1" href="image_big_1.jpg"><img src="image_small_1.jpg" alt=""/></a>
<a class="grouped_elements" rel="group1" href="image_big_2.jpg"><img src="image_small_2.jpg" alt=""/></a>
 
<a class="grouped_elements" rel="group2" href="image_big_3.jpg"><img src="image_small_3.jpg" alt=""/></a> 
<a class="grouped_elements" rel="group2" href="image_big_4.jpg"><img src="image_small_4.jpg" alt=""/></a>
 
4、JS文件控制:
 
<script type="text/javascript">
    jQuery(document).ready(function ($) {
        $("a[rel=group1]").fancybox({
            'titleShow': true,
            'transitionIn': 'none',
            'showNavArrows': true,
            'transitionOut': 'none'
        });
    })
</script>
熱門關(guān)鍵詞: Fancybox jquery開發(fā) Lightbox插件

您可能感興趣的相關(guān)文章:

欄目列表
推薦內(nèi)容
熱點(diǎn)內(nèi)容
展開