html - 某些表中每个 tr 的第一个 td 的 CSS

标签 html css

我有一个 ID 为“student”的表。 例如

 <table id="student">
    <tr>
        <td>Role</td>
        <td>Merin</td>
        <td>Nakarmi</td>
    </tr>
    <tr>
        <td>Role</td>
        <td>Tchelen</td>
        <td>Lilian</td>
    </tr>
    <tr>
        <td>Role</td>
        <td>Suraj</td>
        <td>Shrestha</td>
    </tr>
</table>

对于此表中的每一行,第一个 <td>具有值(value) Angular 色,我想先隐藏这个 <td>对于每一行。 我试过类似的选项

#student > tr > td:first-child
{ 
    width: 0px; important;
}

但不幸的是没有成功。

请帮忙

最佳答案

使用下面的。

table#student tr td:first-child{display:none;}

WORKING DEMO

关于html - 某些表中每个 tr 的第一个 td 的 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20067347/

相关文章:

javascript - AngularJS - 使用 ng Repeat 单独显示 div

javascript - 使用按钮清除内容

html - 用鼠标绘制矩形并在 mouseup 上填充颜色

javascript - 如何让子 div 用边距填充父 div 的空间?

jQuery 验证未捕获的类型错误 : Cannot call method 'getAttribute' of undefined

css - 在 Drupal 主题中调整大 Logo 的大小

html - 在称为另一种样式的跨度内悬停时更改 SVG 颜色

css - Chrome : overflow:auto + margin:auto fails to layout correctly sometimes

html - 为什么这不会垂直对齐? img 到 div 的左边

javascript - html网页中的表情符号选择器