【发布时间】:2021-07-30 10:29:11
【问题描述】:
使用 tailwindcss 2,我想在小型设备上使用 sm:hidden: 隐藏表格中的一些列:
<table class="table-auto">
<thead class="bg-gray-700 border-b-2 border-t-2 border-gray-300">
<tr>
<th class="py-2">Name</th>
<th class="py-2">Active</th>
<th class="py-2">Type</th>
<th class="py-2 sm:hidden">Category</th>
<th class="py-2 sm:hidden">Mailchimp Id</th>
<th class="py-2"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="">
Name content
</td>
<td class="">
Active content
</td>
<td class="">
Typecontent
</td>
<td class=" sm:hidden">
Category content
</td>
<td class="sm:hidden">
mailchimp content
</td>
我预计在设备上 640 像素和更小的 2 列会被隐藏,但失败了。
哪种语法是正确的?
谢谢
【问题讨论】:
标签: tailwind-css