kha*_*rim 5 html javascript css jquery
我已经看过了,这不是我需要的......
我需要类似的东西
table.mytable tr first-td's { border: 1px solid black; }
Run Code Online (Sandbox Code Playgroud)
对于
<table class="mytable">
<tr>
<td>This has the border</td>
<td>no border</td>
<td>no border</td>
</tr>
<tr>
<td>This has the border</td>
<td>no border</td>
<td>no border</td>
</tr>
<tr>
<td>This has the border</td>
<td>no border</td>
<td>no border</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
如果这是不可能的,请告诉我,我会感到难过.
如果需要完成工作,Javascript/jQuery是可以接受的.
table.mytable tr td:first-child { border: 1px solid black; }
Run Code Online (Sandbox Code Playgroud)
https://developer.mozilla.org/en-US/docs/CSS/:first-child
也适用于jQuery(http://api.jquery.com/first-child-selector/):
$('table.mytable tr td:first-child')
Run Code Online (Sandbox Code Playgroud)
是的。它\xc2\xb4s可能:
\n在你的 CSS 中使用
\n.mytable tr td:first-child { border: 1px solid black; }\xe2\x80\x8b\nRun Code Online (Sandbox Code Playgroud)\n\n
| 归档时间: |
|
| 查看次数: |
5983 次 |
| 最近记录: |