gpt4 book ai didi

css - 如何自定义表响应实现?

转载 作者:太空宇宙 更新时间:2023-11-04 05:50:36 25 4
gpt4 key购买 nike

我的脚本是这样的:

<table class="responsive-table">
<thead>
<tr>
<th>Mon</th>
<th>Tue</th>
<th>Wed</th>
<th>Thr</th>
<th>Fri</th>
<th>Sat</th>
<th>Sun</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul>
<li>09:00-09:30</li>
<li>10:00-10:30</li>
</ul>
</td>
<td>
<ul>
<li>14:00-14:30</li>
</ul>
</td>
<td>
<ul>
<li>12:30-13:00</li>
<li>14:00-14:30</li>
</ul>
</td>
<td>
<ul>
<li>15:00-16:00</li>
</ul>
</td>
<td>
<ul>
<li>16:00-16:30</li>
</ul>
</td>
<td>
<ul>
<li>09:00-09:30</li>
</ul>
</td>
<td>
<ul>
<li>-</li>
</ul>
</td>
</tr>
</tbody>
</table>

演示:https://jsfiddle.net/g9b7oj8t/

如果通过桌面访问,看起来不错

但是如果是手机访问的话,就显得凌乱了

如何从 materialize 自定义 css 以便在移动设备上显示整洁?

最佳答案

这是 Materialize 的一个已知问题。 Here you find the reference to the problem.

这是 GitHub 上建议的解决方案。

<thead>
<tr>
<th>Mon<br/>&nbsp;</th>
<th>Tue<br/>&nbsp;</th>
<th>Wed<br/>&nbsp;</th>
<th>Thr<br/>&nbsp;</th>
<th>Fri<br/>&nbsp;</th>
<th>Sat<br/>&nbsp;</th>
<th>Sun<br/>&nbsp;</th>
</tr>
</thead>

Here the working example on JSFiddle

但为了正常工作,您不能在单元格内使用太多样式,否则高度不会得到尊重。

关于css - 如何自定义表响应实现?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58312493/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com