css设置table边框1px并居中显示



<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>css设置table边框1px并居中显示-Mzwu.COM</title>
    <style type="text/css">
        table {
            margin: auto;
            width: 90%;
        }

        table, td {
            border: 1px solid #cccccc;
            border-collapse: collapse;
        }
    </style>
</head>

<body>
    <table>
        <tr>
            <td>名称</td>
            <td>域名</td>
        </tr>
        <tr>
            <td>百度</td>
            <td>http://www.baidu.com/</td>
        </tr>
        <tr>
            <td>谷歌</td>
            <td>http://www.google.com/</td>
        </tr>
    </table>
</body>
</html>


评论: 0 | 引用: 0 | 查看次数: 4446
发表评论
登录后再发表评论!