<h4>垂直的表头:</h4>
<table border="1">
<tr>
<th>姓名</th>
<td>Bill Gates</td>
</tr>
<tr>
<th>电话</th>
<td>555 77 854</td>
</tr>
<tr>
<th>电话</th>
<td>555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855</td>
</tr>
</table>
</body>
</html>
姓名 | Bill Gates |
---|---|
电话 | 555 77 854 |
电话 | 555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855555 77 855 |
左边的表头我想要显示成一行的,有什么办法吗?
另:求推荐一些不错的 table 的样式。
谢谢解答
Give
<th>
a try with fixed widthBe careful to limit the range when writing CSS, otherwise all TH will become fixed width.
It’s not wide enough to fit, please make it wider
By using the <colgroup> tag, you can apply styles to an entire column without having to repeatedly style each cell or row.
Click to view the table effect
Is this form good-looking?
What about this? Is it not bad?