Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个未完全填充文本的表格单元格,因此 bg 颜色不会覆盖整个单元格。我仍然希望在不使用整个表格的背景颜色的情况下让整个表格单元格填充相同的颜色。
那么是否可以在不使用整个表格的背景颜色的情况下用颜色填充整个单元格?
您可以为<td>元素分配一个类,然后使用background-color该类的 CSS 属性分配一个 bg 颜色。
<td>
background-color