html5,table表格

html5,table表格,第1张

你好!

<style>

table {

    font-family: arial, 宋体, sans-serif

    border-spacing: 0

    border-collapse: collapse

}

tbody {

    display: table-row-group

    vertical-align: middle

    border-color: inherit

}

td,

th {

    display: table-cell

    vertical-align: inherit

}

table th,

table td {

    padding: 2px 10px

    font-size: 12px

    line-height: 22px

    height: 22px

    border: 1px solid #e6e6e6

}

table th {

    border-bottom: 1px solid #e6e6e6

    text-align: left

    font-weight: 700

    height: 23px

    background-color: #f8f8f8

}

table.table-view {

    margin: 5px 0

    border-collapse: collapse

    word-wrap: break-word

    word-break: break-all

    font-size: 12px

    line-height: 22px

    color: #000

}

caption {

    display: table-caption

    text-align: -webkit-center

}

table caption {

    font-weight: 700

        padding: 10px 0

    padding: 8px 0 9px

    font-size: 14px

}

table a {

    color: #136ec2

    text-decoration: none

}

</style> <table log-set-param="table_view" class="table-view log-set-param">

    <caption>金满贯</caption>

    <tbody>

        <tr>

            <th height="0" align="left">

                <div class="para" label-module="para">网球奖项</div>

                <div class="para" label-module="para">(英文)</div>

            </th>

            <th height="0" align="left">

                <div class="para" label-module="para">网球奖项</div>

                <div class="para" label-module="para">(中文)</div>

            </th>

            <th>分类</th>

            <th height="0" align="left">信息</th>

        </tr>

        <tr>

            <td width="100" height="0" align="left" valign="center" rowspan="2"><b>Golden Slam</b></td>

            <td width="87" height="0" align="left" valign="center" rowspan="2">

                <div class="para" label-module="para"><a target="_blank" href="/item/%E9%87%91%E6%BB%A1%E8%B4%AF"><b>金满贯</b></a></div>

                <div class="para" label-module="para"><b>★★★★</b></div>

            </td>

            <td width="91" align="left" valign="center">年度金满贯</td>

            <td valign="top" align="left" width="354">

                <div class="para" label-module="para">(年度金满贯:是指一位选手在一个赛季里(一年)同时获得所有四大满贯赛事的冠军和<a target="_blank" href="/item/%E5%A4%8F%E5%AD%A3%E5%A5%A5%E6%9E%97%E5%8C%B9%E5%85%8B%E8%BF%90%E5%8A%A8%E4%BC%9A">夏季奥林匹克运动会</a>网球项目金牌。)</div>

            </td>

        </tr>

        <tr>

            <td width="91" align="left" valign="center">职业金满贯</td>

            <td width="354" align="left" valign="center">(职业金满贯:是指一位选手在职业生涯中非连续夺得所有四大满贯赛事的冠军和<a target="_blank" href="/item/%E5%A4%8F%E5%AD%A3%E5%A5%A5%E6%9E%97%E5%8C%B9%E5%85%8B%E8%BF%90%E5%8A%A8%E4%BC%9A">夏季奥林匹克运动会</a>网球项目金牌。)</td>

        </tr>

    </tbody>

</table>

希望对你有帮助!

$('#table1').css({

'align' : 'center'

})//jquery的解决方式很完美的,table那里设置相应的id

等效于js中的document.getElementById('table1').style.align="center"


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/7059200.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-01
下一篇 2023-04-01

发表评论

登录后才能评论

评论列表(0条)

保存