我看到JavaScript的答案,但不只使用CSS。是否有可能僅使用CSS來引用表頭要引用的表格單元格?如何選擇僅使用CSS引用的TH的TD?
如果我有:
<table id="required-education">
<thead>
<tr>
<th class="tbl-requirement-subheader" colspan=3>
Basic Skills (General Core) Courses - Area III
</th>
</tr>
<tr>
<th class="tbl-area-description" colspan=3>
Social/Behavioral Sciences
</th>
</tr>
<tr>
<th class="tbl-class-header">Class Name</th>
<th class="tbl-class-header">Description</th>
<th class="tbl-class-header">Hours</th>
</tr>
</thead>
<tbody>
<tr>
<td> <!-- how do I select these next three td cells only with only CSS? -->
EMPL 999
</td>
<td>Interpersonal Relations and Professional Development</td>
<td>2</td>
</tr>
<tr>
<td class="tbl-class-decription" colspan=3>a description
2 credits
</td>
</tr>
<tr>
<td colspan=3 class="tbl-prerequisite">Prerequisite</td>
</tr>
<tr>
<td class="tbl-prerequisite-info" colspan=3>
Provisional admission
</td>
</tr>
</table>
我不明白 –
@SleekGeek一些行和列1的例子TD被選中,列1的應參考/選擇。即使我有點困惑。我希望我的權利OP。 – hulkinBrain
Richard,閱讀HTML評論。 – miny1997