0
テーブル内でcol- {ブレークポイント} -autoを使用できますか?テーブル内の内容に基づく列の自動幅
col- {breakpoint} -autoクラスを使用すると、列の内容の自然な幅に基づいてサイズを調整できます。
テーブル内でcol- {ブレークポイント} -autoを使用できますか?テーブル内の内容に基づく列の自動幅
col- {breakpoint} -autoクラスを使用すると、列の内容の自然な幅に基づいてサイズを調整できます。
あなたは>秒すぎ<テーブルでそれらを使用しますが、私の知る限り.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"/>