jquery使用ColorBox彈出圖片組瀏覽層實例演示
更新時間:2013年03月14日 12:07:51 作者:
本示例使用Jquery的ColorBox插件彈出圖片組瀏覽層,點擊會彈出頁中窗的效果同時帶有關閉及上一個下一個的切換,個人感覺相當不錯的彈出窗,感興趣的你可不要錯過了哈
本示例使用Jquery的ColorBox插件彈出圖片組瀏覽層。效果預覽網(wǎng)址:http://www.keleyi.com/keleyi/phtml/colorbox/
以下是本效果的完整代碼,將以下代碼保存到html文件,打開即可預覽效果。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>使用ColorBox彈出圖片組瀏覽層</title>
<link rel="stylesheet" />
<script type="text/javascript" src="http://www.keleyi.com/keleyi/pmedia/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://www.keleyi.com/keleyi/phtml/colorbox/jquery.colorbox-min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".keleyi_com").colorbox({ rel: 'group1', transition: "none", innerWidth: '700px' });
});
</script>
</head>
<body>
<div style="width:400px;margin-left:auto;margin-right:auto;">
請點擊下面鏈接,即可在彈出層顯示圖片組。
<p><a class="keleyi_com" title="菊花">圖片一</a></p>
<p><a class="keleyi_com" title="開心">圖片二</a></p>
<p><a class="keleyi_com" title="宋慧喬">圖片三</a></p>
<p><a class="keleyi_com" title="夢想">圖片四</a></p>
</div></body>
</html>
以下是本效果的完整代碼,將以下代碼保存到html文件,打開即可預覽效果。
復制代碼 代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>使用ColorBox彈出圖片組瀏覽層</title>
<link rel="stylesheet" />
<script type="text/javascript" src="http://www.keleyi.com/keleyi/pmedia/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://www.keleyi.com/keleyi/phtml/colorbox/jquery.colorbox-min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".keleyi_com").colorbox({ rel: 'group1', transition: "none", innerWidth: '700px' });
});
</script>
</head>
<body>
<div style="width:400px;margin-left:auto;margin-right:auto;">
請點擊下面鏈接,即可在彈出層顯示圖片組。
<p><a class="keleyi_com" title="菊花">圖片一</a></p>
<p><a class="keleyi_com" title="開心">圖片二</a></p>
<p><a class="keleyi_com" title="宋慧喬">圖片三</a></p>
<p><a class="keleyi_com" title="夢想">圖片四</a></p>
</div></body>
</html>
您可能感興趣的文章:
- JQuery獲取樣式中的background-color顏色值的問題
- Jquery顏色選擇器ColorPicker實現(xiàn)代碼
- Colortip基于jquery的信息提示框插件在IE6下面的顯示問題修正方法
- JQuery 拾色器插件發(fā)布-jquery.icolor.js
- jquery衣服顏色選取插件效果代碼分享
- JQuery實現(xiàn)動態(tài)適時改變字體顏色的方法
- jQuery實現(xiàn)表格顏色交替顯示的方法
- jQuery實現(xiàn)鼠標滑過Div層背景變顏色的方法
- jquery修改網(wǎng)頁背景顏色通過css方法實現(xiàn)
- jquery獲取css的color值返回RGB的方法
相關文章
jquery動態(tài)賦值id與動態(tài)取id方法示例
這篇文章主要給大家介紹了關于jquery動態(tài)賦值id與動態(tài)取id的相關資料,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面跟著小編來一起學習學習吧。2017-08-08jQuery EasyUI API 中文文檔 - ValidateBox驗證框
jQuery EasyUI API 中文文檔 - ValidateBox驗證框,使用jQuery EasyUI的朋友可以參考下。2011-10-10jQuery點擊彈出層彈出模態(tài)框點擊模態(tài)框消失代碼分享
這篇文章主要介紹了jQuery點擊彈出層,彈出模態(tài)框,點擊模態(tài)框消失的實現(xiàn)代碼,代碼簡單易懂,非常不錯,具有參考借鑒價值,需要的朋友參考下2017-01-01jQuery 實現(xiàn)DOM元素拖拽交換位置的實例代碼
這篇文章主要介紹了jQuery 實現(xiàn)DOM元素拖拽交換位置,本文通過實例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-07-07基于MVC5和Bootstrap的jQuery TreeView樹形控件(二)之數(shù)據(jù)支持json字符串、list集合
這篇文章主要介紹了基于MVC5和Bootstrap的jQuery TreeView樹形控件(二)之數(shù)據(jù)支持json字符串、list集合的相關資料,需要的朋友可以參考下2016-08-08