码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-11-14 15:07:51      阅读:132      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!