BootWiki教程网
源代码:
点击运行
<!DOCTYPE html> <html> <head> <title>Bootstrap 实例</title> <meta charset="utf-8"> <meta content="width=device-width, initial-scale=1" name="viewport"> <link href="//cdn.staticfile.net/twitter-bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> <script src="//cdn.staticfile.net/jquery/3.2.1/jquery.min.js"></script> <script src="//cdn.staticfile.net/popper.js/1.12.5/umd/popper.min.js"></script> <script src="//cdn.staticfile.net/twitter-bootstrap/4.0.0/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <h3>弹出框实例</h3> <br> <a data-content="点击文档的其他地方关闭我" data-toggle="popover" data-trigger="focus" href="#" title="取消弹出框">点我</a> </div> <script> $(document).ready(function(){ $('[data-toggle="popover"]').popover(); }); </script> </body> </html>
运行结果