利用jQuery实现flipLightBox灯箱插件



130 519 174



特效描述:利用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>



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


热门标签: 瀑布流 收藏 预览 自适应页面大小 响应式区块列表布局 摇摆 烟花 清单样式 照相机 注释 下划线 结构图 鼠标悬停 条形码 弹幕 画板 朋友圈样式 红包 css绘制样式 支付 图文布局 导航切换 右键菜单 缩略图 二维码 文字提示框 图片相册 地图 图片切换 提示框/弹出层 图片墙 计算器 文字切换 layer 百叶窗 计时器 背景切换 lightbox 图片网格 桌面 手风琴 图片九宫格 跳转 Tooltip工具提示框 选项卡自动切换 步骤 浮动提示框 视频切换 图片高亮 键盘 html5弹窗动画 列表切换 图片对比 签到 图片文字 分享 渐隐切换 单排图片 点赞 投票 全屏切换 响应式图片 雪花 切换按钮 图片列表 打印 缩放切换 答题 震动 图表 鼠标滑过 抽奖 表情 qq空间 头像截图 星星打分评分 编辑器 播放器 电子杂志 排行榜 分页翻页 排序 表格隔行变色 table表格 进度条 多功能 图片拖动 图片放大镜 图片叠加 图片翻转旋转 图片延迟加载 图片淡出淡进 图片全屏 图片头像上传 二维码 滚动切换 滑动选项卡切换 图片广告 图片放大缩小 html5图片动画 带缩略图的幻灯片 地图 图片滚动 图片滑动 图片切换 图片收缩展开 旋转木马 图片轮播 自动滚动图片轮播 图标导航菜单 弹出层拖动 选项卡切换 滑动手风琴 背景切换 窗口提示框 滑动星星打分 手风琴 图表 图片 头像截图 其他更多

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

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

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