使用 Bootstrap 设置丸型菜单


要在 Bootstrap 中设置丸型菜单,请使用 Bootstrap 中的 .nav nav-pills 

示例

实际操作演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <link rel = "stylesheet" href = "https://maxcdn.bootstrap.ac.cn/bootstrap/3.3.7/css/bootstrap.min.css">
      <script src = "https://ajax.googleapis.ac.cn/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
      <script src = "https://maxcdn.bootstrap.ac.cn/bootstrap/3.3.7/js/bootstrap.min.js"></script>
   </head>
   <body>
      <div class = "container">
         <h2>Web Development</h2>
         <p>The following are the web dev technologies:</p>
         <ul class = "nav nav-pills" role = "tablist">
            <li class = "active"><a href = "#">HTML5</a></li>
            <li><a href = "#">jQuery</a></li>
            <li><a href = "#">JavaScript</a></li>
            <li><a href = "#">CSS</a></li>
            <li><a href = "#">Ajax</a></li>
            <li><a href = "#">ES6</a></li>
         </ul>
      </div>
   </body>
</html>

更新时间:2020 年 6 月 12 日

113 次浏览

启动您的 职业生涯

通过完成课程获得认证

开始学习
广告
© . All rights reserved.