利用jQuery实现flipLightBox灯箱插件



45 178 60



特效描述:利用jQuery实现 flipLightBox 灯箱插件,利用jQuery实现flipLightBox灯箱插件

代码结构

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/global.css" />
<link rel="stylesheet" type="text/css" href="css/flb3.css" />
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/global.css" />
<link rel="stylesheet" type="text/css" href="css/flb3.css" />

2. 引入JS

<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="fliplightbox/fliplightbox.min.js"></script>
<script type="text/javascript" src="scripts/flb_showcase.js"></script>
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="fliplightbox/fliplightbox.min.js"></script>
<script type="text/javascript" src="scripts/flb_showcase.js"></script>

3. 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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0;">
<link rel="SHORTCUT ICON" href="favicon.ico" />
</head>
<body >
<div id="container">
<div id="content-background" class="content">
</div>
<div id="about-content" class="content">
<div id="inner-about-content">
<div id="about-column">
<h1>About flipLightBox <img src="images/website/browsers2.png" width="161" height="26" alt="Browsers" id="browsers"></h1><br />
flipLightBox is a free Responsive Lightbox jQuery Plugin that is extremely easy to implement and doesn't require any additional stylesheets, scripts or libraries. Its main feature is an optional flip effect as each lightbox image opens and closes. Another optional feature is a toggled slide text bar and navigation to accompany the lightbox images.
<a href="download/flipLightBox.zip" class="download">Upgrades</a> are also available.<br /><br />
<h2><a href="download/flipLightBox.zip" class="download" style="color: #cc0000;">Download flipLightBox Here</a></h2><br />
<h3>How To Set Up</h3><br />
<b>1)</b> In your html document, before the closing <b>&#60;/body&#62;</b> tag insert:<br /><span class="script">&#60;script type="text/javascript" src="<span id="condensed">http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js</span>"&#62;&#60;/script&#62;<br />
&#60;script type="text/javascript" src="fliplightbox/fliplightbox.min.js"&#62;&#60;/script&#62;<br />&#60;script type="text/javascript"&#62;$('body').flipLightBox()&#60;/script&#62;</span><br /><br />
<b>2)</b> Create an <b>&#60;a&#62;</b> tag that links to your lightbox image jpg, gif or png. Then add a class attribute named <b>flipLightBox</b>, like so: <br /><span class="script">&#60;a href="lightbox-image.jpg" class="flipLightBox"&#62;Link Text or Image&#60;span&#62;Optional Lightbox Text&#60;/span&#62;&#60;/a&#62;</span><br />Notice there is a <b>&#60;span&#62;</b> tag next to the image. Within this you can add optional text to accompany the lightbox image when opened.<br /><br />
<b>3)</b> Download <a href="download/flipLightBox.zip" class="download">flipLightBox.zip</a>, unzip and place the <b>fliplightbox</b> folder into your website directory. <b>You are now up and running!</b><br /><br />
<h3>Adjusting The Settings</h3><br />
The settings can be adjusted either within <b>fliplightbox.min.js</b> or by modifying the 'plugin call', as the example below:<br /><span class="script">$('body').flipLightBox({ lightbox_flip_speed: 500, lightbox_border_color: '#666666' })</span><br /><br />
Demos and more instructions can also be found in <a href="download/flipLightBox.zip" class="download">flipLightBox.zip</a><br /><br />
</div>
<img id="close-about" src="data:image/gif;base64,R0lGODlhMgAyAIABAP///////yH5BAEAAAEALAAAAAAyADIAAALPjI+py+0Po5y0HoCz3rx7/HziKDbkiWZLyp5Kd7VcvL01ImvJvOu2vPLhVAxgkTgEmVIOIQ0QcjWRT+i0dFUmqUFP1GmAZcE/sndsXfK2N3X6KGa3j5BPOW4JjO54ConfJ/HXMygoJWcXwUR46FZYtffVGIZiOKl3iXaGuDZx+egXyclVIQpJ1iPZSRnIqGrWKveqdTr71gWLOnrLd2erW1X2O4cr7GhqvHUMqszIi2mUDOnc4kudljO3Cp3djdsdfQ3OvDu+nYeerr7Ojl4AADs=" width="25px" height="25px" alt="Close" />
</div>
<div class="contact">
Contact us at <a href="mailto:info@flipgallery.net?subject=flipGallery Product Enquiry" class="how-to-email">info@flipGallery.net</a> for product enquiries. <span class="fliplink">Also check out our other script: <a href="" target="_blank">flipGallery</a></span><br /><br />
</div>
</div>
<div id="download-content" class="content">
<div id="inner-download-content">
<h4>Download Options</h4>
<div class="option-column">
<h5>Non Commercial</h5><br />
<span class="price">Free</span><br /><br />
<a href="download/flipLightBox.zip" id="non-commercial-use-download"><img src="images/website/download.png" width="150" height="45" alt="Download Non Comercial Version" /></a><br /><br />
<span class="licence">Non Commercial Use<br />or Trial Purposes<br /><br /></span>
<span class="features"><b>Features</b><br />
Responsive<br />
Speed, Navigation &amp; Text Control<br /><br />
</span>
</div>
<div class="option-column">
<h6>Multi Commercial Use</h6><br />
<span class="price">&#36;12</span><br /><br />
<form action="https://51qianduan.com" method="post"><input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="hosted_button_id" value="CLF7QWRHRA2LS"><input type="image" src="images/website/purchase.png" width="150" height="45" id="purchase-commercial-version" alt="Purchase Commercial Version"></form><br />
<span class="licence">For Commercial Use<br />Multi Domain Licence<br /><br /></span>
<span class="features"><b>Features</b><br />
Retina/HD Display Media Kit<br />
Responsive<br />
Speed, Navigation &amp; Text Control<br />
</span>
</div>
<div class="option-column">
<h6>Custom Solutions</h6><br />
<span class="price">&#36;49+</span><br /><br />
<a href="mailto:info@flipgallery.net?subject=Custom Solutions Enquiry" id="custom-solutions-enquiry"><img src="images/website/enquiry.png" width="150" height="45" alt="Make An Enquiry" /></a><br /><br />
<span class="licence">For Commercial Use<br />Unlimited Domain Licence<br /><br /></span>
<span class="features"><b>Services<span class="star">*</span></b><br />
Bespoke Customisations<br /><br />
</span>
<span id="star">*All Custom Solutions include features from Multi Commercial Use version</span>
</div>
<img class="close-download" id="close-download" src="data:image/gif;base64,R0lGODlhMgAyAIABAP///////yH5BAEAAAEALAAAAAAyADIAAALPjI+py+0Po5y0HoCz3rx7/HziKDbkiWZLyp5Kd7VcvL01ImvJvOu2vPLhVAxgkTgEmVIOIQ0QcjWRT+i0dFUmqUFP1GmAZcE/sndsXfK2N3X6KGa3j5BPOW4JjO54ConfJ/HXMygoJWcXwUR46FZYtffVGIZiOKl3iXaGuDZx+egXyclVIQpJ1iPZSRnIqGrWKveqdTr71gWLOnrLd2erW1X2O4cr7GhqvHUMqszIi2mUDOnc4kudljO3Cp3djdsdfQ3OvDu+nYeerr7Ojl4AADs=" width="25px" height="25px" alt="Close Download" /><br />
<div class="contact">
Contact us at <a href="mailto:info@flipgallery.net?subject=flipGallery Product Enquiry" class="how-to-email">info@flipGallery.net</a> for product enquiries. <span class="fliplink">Also check out our other script: <a href="" target="_blank">flipGallery</a></span><br /><br />
</div>
</div>
</div>
<div id="demo">
<a href="images/eamonnmccabe2/enlarged/jude-law.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/jude-law.jpg" alt="Jude Law" width="230" height="230" /><span><b>Jude Law</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/al-pacino.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/al-pacino.jpg" alt="Al Pacino" width="230" height="230" /><span><b>Al Pacino</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/antony-hopkins.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/antony-hopkins.jpg" alt="Antony Hopkins" width="230" height="230" /><span><b>Antony Hopkins</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/ben-kingsley.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/ben-kingsley.jpg" alt="Ben Kingsley" width="230" height="230" /><span><b>Ben Kingsley</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/bono.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/bono.jpg" alt="Bono" width="230" height="230" /><span><b>Bono</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/zadie-smith.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/zadie-smith.jpg" alt="Zadie Smith" width="230" height="230" /><span><b>Zadie Smith</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/john-hurt.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/john-hurt.jpg" alt="John Hurt" width="230" height="230" /><span><b>John Hurt</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/lou-reed.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/lou-reed.jpg" alt="Lou Reed" width="230" height="230" /><span><b>Lou Reed</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/kristin-scott-thomas.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/kristin-scott-thomas.jpg" alt="Kristin Scott Thomas" width="230" height="230" /><span><b>Kristin Scott Thomas</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/lemmy.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/lemmy.jpg" alt="Lemmy" width="230" height="230" /><span><b>Lemmy</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/morgan-freeman.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/morgan-freeman.jpg" alt="Morgan Freeman" width="230" height="230" /><span><b>Morgan Freeman</b> &copy; Eamonn McCabe.</span></a>
<a href="images/eamonnmccabe2/enlarged/mel-brooks.jpg" class="flipLightBox"><img src="images/eamonnmccabe2/thumbs/mel-brooks.jpg" alt="Mel Brooks" width="230" height="230" /><span><b>Mel Brooks</b> &copy; Eamonn McCabe.</span></a>
</div>
</div>
<script type="text/javascript">$('body').flipLightBox()</script>
<div style="text-align:center;clear:both"><br>
</div>
</body>
</html>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 图片全屏 图片淡出淡进 图片淡出 图片淡进 二维码 图片延迟加载 图片延迟 图片加载 图片翻转 图片旋转 图片叠加 图片层叠 图片拖动 图片拖拽 图片放大镜 头像上传 图片上传 带缩略图的幻灯片 h5图片动画 h5图标动画 html5图片动画 html5图标动画 图片放大缩小 图片缩放 图片大小 图片放大 图片缩小 图片变大 图片变小 图片广告 地图 中国地图 世界地图 滚动切换 滚动条切换 滑动选项卡 滑动切换 旋转木马 图片旋转木马 文字旋转木马 旋转木马插件 图片滚动 图片滚动条 图片滑动 图片滑块 图片收缩展开 图片收缩 图片展开 纯图片轮播 图片轮播 图片切换 图片选项卡 图标选项卡 自动滚动图片轮播 图标导航 图标菜单 弹出层拖动 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 滑动手风琴 背景切换 大图切换 滑动星星打分 手风琴 水平手风琴 垂直手风琴 图片手风琴 文字手风琴 手风琴插件 窗口 弹出 弹窗 弹出层 提示框 对话框 遮罩 遮罩层 弹窗插件 图表 图片 图片插件 头像截图 其他 预览 图片相册 相册图片 图片切换 图片选项卡 图标选项卡 lightbox 图片网格 渐隐切换

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到