fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap弹出框使用title和content选项</title> <meta name="description" content="Creating Popover with Bootstrap with title and content option"> <link href="/jscss/bootstrap/v3/bootstrap.css" rel="stylesheet"> </head> <body> <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="http://libs.baidu.com/jquery/1.7.1/jquery.min.js"></script> <script src="/jscss/bootstrap/bootstrap-tooltip.js"></script> <script src="/jscss/bootstrap/bootstrap-popover.js"></script> <script> $(function (){ $("#example").popover({title: 'Bootstrap 弹出框', content: "为我的网站创建一个提示框如此简单!"}); }); </script> </body> </html>
运行结果