bootstrap表格样式

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>我是中国人</title>

        <!-- 新 Bootstrap 核心 CSS 文件 -->
        <link href="css/bootstrap.min.css" rel="stylesheet">

        <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
        <script src="js/bootstrap.min.js"></script>

        <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    </head>
    <body>
        <table border="" cellspacing="" cellpadding="" class="table table-bordered table-hover table-striped table-condensed">
            <tr>
                <th>名称</th>
                <th>数量</th>
                <th>单价</th>
            </tr>
            <tr>
                <td>玉米</td>
                <td>10</td>
                <td>3</td>
            </tr>
            <tr>
                <td>大豆</td>
                <td>20</td>
                <td>60</td>
            </tr>
        </table>
    </body>
</html>

image

table:表格的基类,其他样式都基于table

table-bordered:给表格加外边框

table-hover:鼠标悬停变色

table-striped:斑马线效果,隔行换色

table-condensed:紧凑布局

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐