简单教程
提交运行
代码编辑器:
<!DOCTYPE htm> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://cdn.bootcss.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet"> <style>body {margin:10px}</style> <div class="container"> <h2>Bootstrap弹出框使用title和content选项</h2> <div class="well"> <a href="#" id="example" class="btn btn-success" rel="popover">悬停弹出</a> </div> </div> <script src="/static/lib/bootstrap/2.3.2/docs/assets/js/jquery.js"></script> <script src="/static/lib/bootstrap/2.3.2/docs/assets/js/bootstrap.min.js"></script> <script> $(function (){ $("#example").popover({ title: "Twitter Bootstrap Popover", content: "为我的网站创建一个提示框如此简单!" }); }); </script>
运行结果: