Bootstrap(六)選單和按鈕
阿新 • • 發佈:2018-12-13
<!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Title</title> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> </head> <body> <div class="dropdown"> <button class="dropdown-toggle" data-toggle="dropdown"> 測試按鈕 <span class="caret"></span> </button> <ul class="dropdown-menu"> <li class="dropdown-header">測試標題1</li> <li><a href="#">連結資訊1</a> </li> <li><a href="#">連結資訊2</a> </li> <li class="dropdown-divider"></li> <li class="dropdown-header">測試標題2</li> <li><a href="#">連結資訊3</a> </li> <li><a href="#">連結資訊4</a> </li> </ul> </div> <div class="btn-toolbar"> <div class="btn-group"> <button type="button" class="btn btn-success">測試按鈕1</button> <button type="button" class="btn btn-info">測試按鈕2</button> <button type="button" class="btn btn-primary">測試按鈕3</button> </div> <div class="btn-group"> <button type="button" class="btn btn-warning">測試按鈕4</button> <button type="button" class="btn btn-dark">測試按鈕5</button> <button type="button" class="btn btn-danger">測試按鈕6</button> </div> <div class="btn-group"> <button type="button" class="btn btn-dark">測試按鈕7</button> <button type="button" class="btn btn-dark">測試按鈕8</button> <div class="btn-group"> <button type="button" class="btn btn-dark dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 下拉按鈕 </button> <div class="dropdown-menu"> <a class="dropdown-item" href="#">下拉資訊1</a> <a class="dropdown-item" href="#">下拉資訊2</a> </div> </div> </div> </div> </body> </html>