用于控制表格布局算法的功能类。
Title | Author | Views |
---|---|---|
Intro to CSS | Adam | 858 |
A Long and Winding Tour of the History of UI Frameworks and Tools and the Impact on Design | Adam | 112 |
Intro to JavaScript | Chris | 1,280 |
<table class="table-auto">
<thead>
<tr>
<th>Title</th>
<th>Author</th>
<th>Views</th>
</tr>
</thead>
<tbody>
<tr>
<td>Intro to CSS</td>
<td>Adam</td>
<td>858</td>
</tr>
<tr class="bg-emerald-200">
<td>A Long and Winding Tour of the History of UI Frameworks and Tools and the Impact on Design</td>
<td>Adam</td>
<td>112</td>
</tr>
<tr>
<td>Intro to JavaScript</td>
<td>Chris</td>
<td>1,280</td>
</tr>
</tbody>
</table>
Title | Author | Views |
---|---|---|
Intro to CSS | Adam | 858 |
A Long and Winding Tour of the History of UI Frameworks and Tools and the Impact on Design | Adam | 112 |
Intro to JavaScript | Chris | 1,280 |
<table class="table-fixed">
<thead>
<tr>
<th class="w-1/2 ...">Title</th>
<th class="w-1/4 ...">Author</th>
<th class="w-1/4 ...">Views</th>
</tr>
</thead>
<tbody>
<tr>
<td>Intro to CSS</td>
<td>Adam</td>
<td>858</td>
</tr>
<tr class="bg-blue-200">
<td>A Long and Winding Tour of the History of UI Frameworks and Tools and the Impact on Design</td>
<td>Adam</td>
<td>112</td>
</tr>
<tr>
<td>Intro to JavaScript</td>
<td>Chris</td>
<td>1,280</td>
</tr>
</tbody>
</table>
默认情况下, 针对 table layout 功能类,只生成 responsive 变体。
您可以通过修改您的 tailwind.config.js
文件中的 variants
部分中的 tableLayout
属性来控制为 table layout 功能生成哪些变体。
例如,这个配置也将生成 hover and focus 变体:
// tailwind.config.js
module.exports = {
variants: {
extend: {
// ...
+ tableLayout: ['hover', 'focus'],
}
}
}
如果您不打算在您的项目中使用 table layout 功能,您可以通过在配置文件的 corePlugins
部分将 tableLayout
property to false
in the corePlugins
section of your config file:
// tailwind.config.js
module.exports = {
corePlugins: {
// ...
+ tableLayout: false,
}
}