实例首页
自学教程
IT工具箱
源代码
下载代码
左右布局
点击运行 >
<!DOCTYPE html> <html> <head> <title>Foundation 实例 Lightbox Captions</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdn.staticfile.org/foundation/5.5.3/css/foundation.min.css"> <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.staticfile.org/foundation/5.5.3/js/foundation.min.js"></script> <script src="https://cdn.staticfile.org/foundation/5.5.3/js/vendor/modernizr.js"></script> </head> <body> <div style="padding:20px"> <h2>Lightbox Captions</h2> <p>可以添加 <code>data-caption</code> 属性到每个图片来设置图片的描述。</p> <p>在新窗口打开查看效果更好,打开新窗口 <a target="_blank" href="//demo.runoops.com/sources/foundation5/lightbox_caption.html">点击这里</a>。</p> <ul class="clearing-thumbs" data-clearing> <li><a href="//demo.runoops.com/static/img/a1.jpg" class="th"><img data-caption="The Pulpit Rock" src="//demo.runoops.com/static/img/a1.jpg" width="200" height="100"></a></li> <li><a href="//demo.runoops.com/static/img/a2.jpg" class="th"><img data-caption="Sunrise Skies" src="//demo.runoops.com/static/img/a2.jpg" width="200" height="100"></a></li> <li><a href="//demo.runoops.com/static/img/a3.jpg" class="th"><img data-caption="Northern Lights" src="//demo.runoops.com/static/img/a3.jpg" width="200" height="100"></a></li> </ul> </div> <!-- 初始化 Foundation JS --> <script> $(document).ready(function() { $(document).foundation(); }) </script> </body> </html>
运行结果: