【发布时间】:2023-02-03 19:50:51
【问题描述】:
enter image description here 您好,th's 和 td's 似乎排成一排,我怎样才能得到这种效果?这是 HTML
`<table>
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Job Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>James</td>
<td>Matman</td>
<td>Chief Sandwich Eater</td>
</tr>
<tr>
<td>Jon</td>
<td>Doe</td>
<td>Chief Executive Eater</td>
</tr>
</tbody>
</table>
@media (max-width:360px){
thead {
float: left
}
th{
display: block;
}
tbody {
float: right
}
td{
margin: 0px;
display: block;
}
}`
这是我目前的尝试,但离我需要的结果还很远
【问题讨论】: