css怎样设置表格外边框加粗

CSS设置表格外边框加粗的方法

可以利用border属性设置table外边框的宽度,border 简写属性在一个声明设置所有的边框属性。

示例代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <style type="text/css">
    .mytable{
        width:400px;
        height:150px;
        border:10px solid #000;
    }
    </style>
    <table border="1" class="mytable">
        <tr><td>aaa</td><td>bbb</td></tr>
        <tr><td>ccc</td><td>ddd</td></tr>
</table>
</body>
</html>

输出结果:

14719e883900d80b89daad50d87bfcef

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容