如何用表格设置bootstrap下拉按钮的样式?

时间:2016-04-28 05:44:20

标签: html twitter-bootstrap frontend

我正在尝试在下拉按钮中设置表格。



   <div class="col-sm-6 col-md-6 col-lg-6">
      <button type="button" class="btn btn-secondary btn-block" data-toggle="collapse" data-parent=".accordion" data-target="#demo2" aria-expanded="true">Supported Tenders</button>
      <div id="demo2" class="out collapse in" aria-expanded="true">
         <br>
         <table table-hover="">
               <tr>
                  <td>Account Type URI: Account</td>
               </tr>
               <tr>
                  <td>Network Type URI: Network</td>
               </tr>
               <tr>
                  <td>Onboarding Tender: Discover</td>
               </tr>
               <tr>
                  <td>Onboarding Gateway: MCX</td>
               </tr>
               <tr>
                  <td>Attribute Name: New</td> <tr>
                  </tr><td>Attribute Value: Tender</td>
               </tr>
         </table>
      </div>
   </div>
&#13;
&#13;
&#13;

基本上, 我想知道如何移动&#34;属性名称&#34;和&#34;属性值&#34;到下一栏。

  1. 有没有办法创建一个缩小/折叠表格的面板?
  2. 任何帮助将不胜感激。谢谢!

1 个答案:

答案 0 :(得分:1)

试试这个

&#13;
&#13;
<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
  <h3>table collapsed in this button click for view the table</h3>
  <button type="button" class="btn btn-secondary btn-block" data-toggle="collapse" data-target="#demo">Supported Tenders</button>
  <div id="demo" class="collapse">
     <table table-hover="">
               <tr>
                  <td>Account Type URI: Account</td>
               </tr>
               <tr>
                  <td>Network Type URI: Network</td>
               </tr>
               <tr>
                  <td>Onboarding Tender: Discover</td>
               </tr>
               <tr>
                  <td>Onboarding Gateway: MCX</td>
               </tr>
               <tr>
                  <td>Attribute Name: New</td> 
                  <td>Attribute Value: Tender</td>
               </tr>
         </table>
  </div>
</div>

</body>
</html>
&#13;
&#13;
&#13;