<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <!-- CSS --> <!-- 最新版本的 Bootstrap 核心 CSS 文件 --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"> <style type="text/css"> h4{ margin: 40px 0 10px; } .nav-tabs{ margin-bottom: 15px; } </style> </head> <body> <div class="container"> <h4>Tabs</h4> <ul id="myTab" class="nav nav-tabs"> <li class="active"><a href="#home" data-toggle="tab">Home</a></li> <li><a href="#myhome" data-toggle="tab">myHome</a></li> <li class="dropdown"> <a href="#" id="myTbaDrop1" class="dropdown-toggle" data-toggle="dropdown"> DropDown <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop1"> <li><a href="#fat" tabindex="-1" data-toggle="tab">@fat</a></li> <li><a href="#mdo" tabindex="-1" data-toggle="tab">@mdo</a></li> </ul> </li> </ul> <div id="myTabContent" class="tab-content"> <div class="tab-pane active" id="home"> <p>1asdadfasddasdsad</p> </div> <div class="tab-pane " id="myhome"> <p>3asdadfasddasdsad</p> </div> <div class="tab-pane " id="fat"> <p>4asdadfasddasdsad</p> </div> <div class="tab-pane " id="mdo"> <p>5asdadfasddasdsad</p> </div> </div> </div> <!-- jQuery and JavaScript Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script> </body> </html>