html table表格 竖向样式

HTML

<table class="mailTable"  cellspacing="0" cellpadding="0">
        <tr>
            <td class="column">订单编号</td>
            <td>12121212121212121</td>
        </tr>
        <tr>
            <td class="column">货物城市</td>
            <td>上海</td>
        </tr>
        <tr>
            <td class="column">货物运达城市</td>
            <td>郑州</td>
        </tr>
        <tr>
            <td class="column">货物描述</td>
            <td>衣服</td>
        </tr>
    </table>

CSS样式

.mailTable{
     100%;
    border-top: 1px solid #E6EAEE;
    border-left: 1px solid #E6EAEE;
}
.mailTable tr td{
     200px;
    height: 35px;
    line-height: 35px;
    box-sizing: border-box;
    padding: 0 10px;
    border-bottom: 1px solid #E6EAEE;
    border-right: 1px solid #E6EAEE;
}
.mailTable tr td.column {
    background-color: #EFF3F6;
    color: #393C3E;
     30%;
}

效果

参考: https://www.cnblogs.com/martinl/p/6696273.html

原文地址:https://www.cnblogs.com/wjz-page/p/12987757.html