<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> <!--bootstrap要引入的文件:bootstrap.min.css,jquery.min.js,bootrap.min.js--> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/> <script src="js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script> <!--要在bootstrap之前引入jquery,bootstrap依赖JQUERY,因为bootstrapJS里要使用$这个jquery变量--> <script src="js/popper.min.js" type="text/javascript" charset="utf-8"></script> <!--如果你要用bootstrap使用一些提示性的交互,那么就需要引入提示性的框架popper.js,因为bootstrap的提示就是依赖popper--> <script src="js/bootstrap.js" type="text/javascript" charset="utf-8"></script> </head> <body> <div class="btn-group" role="group" aria-label="Button group with nested dropdown"> <button type="button" class="btn btn-secondary">1</button> <button type="button" class="btn btn-secondary">2</button> <div class="btn-group" role="group"> <button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown"> Dropdown </button> <div class="dropdown-menu" aria-labelledby="btnGroupDrop1"> <a class="dropdown-item" href="#">Dropdown link</a> <a class="dropdown-item" href="#">Dropdown link</a> </div> </div> </div> </body> </html>