首页 > Web开发 > 详细

【代码笔记】Web-CSS-CSS Table(表格)

时间:2019-01-22 10:34:45      阅读:127      评论:0      收藏:0      [点我收藏+]

一,效果图。

技术分享图片

二,代码。

 

技术分享图片
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>CSS Table表格</title>
    <style>
    table {
        border-collapse: collapse;
        width: 100%;
    }
    
    table,
    th,
    td {
        border: 1px solid green;
    }
    
    th {
        height: 50px;
        background-color: green;
        color: white;
    }
    
    td {
        text-align: right;
        height: 50px;
        vertical-align: bottom;
        padding: 15px;
    }
    </style>
</head>

<body>
    <table>
        <tr>
            <th>Firstname</th>
            <th>Lastname</th>
        </tr>
        <tr>
            <td>Peter</td>
            <td>Griffin</td>
        </tr>
        <tr>
            <td>Lois</td>
            <td>Griffin</td>
        </tr>
    </table>
</body>

</html>
技术分享图片

 

参考资料:《菜鸟教程》

【代码笔记】Web-CSS-CSS Table(表格)

原文:https://www.cnblogs.com/yang-guang-girl/p/10301912.html

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