首页 > 其他 > 详细

【caption,thead,tfoot,tbody的使用以及使用nowrap禁止换行】

时间:2015-11-14 15:05:19      阅读:234      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <title>为表格添加标题</title>
    <style type="text/css">
        thead{
            background-color: red;
            color: white;
        }
        tfoot{
            background-color: green;
        }
    </style>
</head>
<body>
<table border="1" width="400px" align="center">
    <caption>这是表格的标题</caption>
    <thead>
    <tr>
        <th nowrap>行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一
            行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一</th>
        <th nowrap>行头二</th>
        <th nowrap>行头三</th>
    </tr>
    </thead>
    <tfoot>
    <tr>
        <th>行尾一</th>
        <th>行尾二</th>
        <th>行尾三</th>
    </tr>
    </tfoot>
    <tbody>
    <tr>
        <td>内容一</td>
        <td>内容二</td>
        <td>内容三</td>
    </tr>
    </tbody>
</table>
</body>
</html>
 

【caption,thead,tfoot,tbody的使用以及使用nowrap禁止换行】

原文:http://www.cnblogs.com/zuixinxian/p/4964301.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!