简单教程
提交运行
代码编辑器:
<!DOCTYPE html> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdn.bootcss.com/foundation/5.5.3/css/foundation.min.css"> <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.bootcss.com/foundation/5.5.3/js/foundation.min.js"></script> <script src="https://cdn.bootcss.com/foundation/5.5.3/js/vendor/modernizr.js"></script> <h2>提示框</h2> <p>默认情况下,提示框会出现在元素的底部</p> <p>可以使用 <code>.tip-top</code>, <code>.tip-left</code>, <code>.tip-right</code> or <code>.tip-bottom</code> (默认) 来设置提示框的位置。</p> <p>在小尺寸的屏幕上,提示框的宽带是 100%</p> <p></p> <p></p> <p></p> <p><span data-tooltip class="has-tip tip-top" title="简单教程">顶部</span></p> <p><span data-tooltip class="has-tip tip-bottom" title="简单教程">底部</span></p> <p><span data-tooltip class="has-tip tip-left" title="简单教程">左边</span></p> <p><span data-tooltip class="has-tip tip-right" title="简单教程">右边</span></p> <!-- 初始化 Foundation JS --> <script> $(document).ready(function() {$(document).foundation();}) </script>
运行结果: