This article refers to this article/q/1010000009900107
There are many table fields, and the table cannot be displayed 100% of the page width.
Now I want the table width to determine the width according to the content. (It doesn't matter if the page appears)
Don't change the form content
<div class=table-responsive">
<table class="table text-nowrap">
<thead>
<tr>
<th> ... </th>
....
</tr>
</thead>
<tbody>
<tr>
<td> ... </td>
....
</tr>
.....
</tbody>
</table>
</div>
Among them, the form needs to be added
table
style,
text-nowrap
Control content without changing lines, the outer layer of the table must have
<div class="table-responsive">
. In the table
thead
and
tbody
Cannot be omitted, otherwise the Bootstrap table style will not be used.