BootWiki教程网
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Bootstrap弹出框使用title和content选项</title> <meta content="Creating Popover with Bootstrap with title and content option" name="description"> <link href="/try/bootstrap/twitter-bootstrap-v2/docs/assets/css/bootstrap.css" rel="stylesheet"> </head> <body> <div class="container"> <h2>使用Bootstrap title 和 content 选项创建一个弹出框</h2> <div class="well"> <a class="btn btn-success" href="#" id="example" rel="popover">悬停弹出</a> </div> </div> <script src="//cdn.staticfile.net/jquery/2.0.0/jquery.js"></script> <script src="/try/bootstrap/twitter-bootstrap-v2/js/bootstrap-tooltip.js"></script> <script src="/try/bootstrap/twitter-bootstrap-v2/js/bootstrap-popover.js"></script> <script> $(function (){ $("#example").popover({title: 'Bootstrap 弹出框', content: "为我的网站创建一个提示框如此简单!"}); }); </script> </body> </html>
运行结果