JSFiddle - React, Tailwind, and code Playground

by qq286735628

HTML

<table>
        <thead>
            <tr>
                <th>该列右对齐(长标题长长长)</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>888</td>
            </tr>
            <tr>
                <td>88</td>
            </tr>
            <tr>
                <td>8</td>
            </tr>
        </tbody>
    </table>

CSS

table{
            border-collapse: collapse;
            width: 400px;
        }
        table tr td,
        table tr th{
            border:1px solid #ccc;
            padding: 5px 10px;
        }
        thead tr th{
            text-align: center;
        }
        tbody tr td{
            text-align: right;
        }