如何在 layui 中改变表格背景色?
在 layui 中改变表格背景色可以通过设置 .layui-table
类的 background-color
属性。
步骤:
-
在 HTML 中使用 layui 的表格组件:
<code class="html"><table class="layui-table"> <thead><tr> <th>ID</th> <th>姓名</th> <th>邮箱</th> </tr></thead> <tbody> <tr> <td>1</td> <td>张三</td> <td>zhangsan@example.com</td> </tr> <!-- ... 其他行 --> </tbody> </table></code>