table.gridtable {
            font-family: verdana,arial,sans-serif;
            font-size:11px;
            color:#333333;
            border-width: 1px;
            border-color: #a9a9a9;
            border-collapse: collapse;
        }
        table.gridtable th {
            border-width: 1px;
            padding: 8px 5px;
            border-style: solid;
            border-color: #a9a9a9;
            background-color: #f0f0f0;
            text-align: center;;
        }
        table.gridtable td {
            border-width: 1px;
            padding: 8px 5px;
            border-style: solid;
            border-color: #a9a9a9;
            background-color: #ffffff;
            text-align: center;;
        }

html代码

<table class="gridtable"
    <tr>
        <th>标签</th>
    </tr>
    <tr>
        <td>10221</td>
    </tr>
</table>

效果如下:

css定义表格样式

相关文章:

  • 2021-07-12
  • 2021-11-22
  • 2022-01-01
  • 2022-12-23
  • 2022-02-17
  • 2021-12-30
  • 2021-10-11
  • 2021-08-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
  • 2021-12-27
  • 2021-05-19
相关资源
相似解决方案