2017-12-29 47 views

答えて

0

あなたは>秒すぎ<テーブルでそれらを使用しますが、私の知る限り.col-auto考慮するとして、表の列のデフォルトの動作の一種であることができます。

下記の例をご覧ください。全画面表示(mdブレークポイントより上)の場合、すべての列は.col-autoのように動作します。ただし、ブレークポイントの下には、指定された幅を持つ最初の列(例では2番目の列、width: 100%;)が他の列から使用可能な領域をすべて占有します。

また、別の使用例として、という文脈では、ブートストラップのドキュメントに.col-autoが記載されています。

<table class="table"> 
 
    <thead> 
 
    <tr> 
 
     <th scope="col" class="col-auto">#</th> 
 
     <th scope="col" class="col-md-auto">First</th> 
 
     <th scope="col" class="col-md-auto">Last</th> 
 
     <th scope="col" class="col-md-auto">Handle</th> 
 
    </tr> 
 
    </thead> 
 
    <tbody> 
 
    <tr> 
 
     <th scope="row">1</th> 
 
     <td>Mark</td> 
 
     <td>Otto</td> 
 
     <td>@mdo</td> 
 
    </tr> 
 
    <tr> 
 
     <th scope="row">2</th> 
 
     <td>Jacob</td> 
 
     <td>Thornton</td> 
 
     <td>@fat</td> 
 
    </tr> 
 
    <tr> 
 
     <th scope="row">3</th> 
 
     <td>Larry</td> 
 
     <td>the Bird</td> 
 
     <td>@twitter</td> 
 
    </tr> 
 
    </tbody> 
 
</table> 
 

 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" rel="stylesheet"/>

関連する問題