学习bootstrap04

1.引入环境:

  <script src="../lib/jquery-3.2.1.js"></script>
    <link href="../lib/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet">
    <script src="../lib/bootstrap-3.3.7-dist/js/bootstrap.js"></script>

2.相关解释:

code:代码风格

&lt=<

&gt=>

var:数学表达式风格

kbd:键盘风格

samp:电脑风格

table:声明是一个表格。

table-striped:斑马纹

table-bordered:带边框

table-hover:悬浮背景色改变

table-condensed:更加紧凑的表格

如果要设置成响应式的表格(小设备明显):

外面放一个div,给上一个table-responsive属性。

<body>
<p class="text-center">
    <code>&lt;head&gt;</code>
    <code>&lt;style&gt;</code>
<pre class="text-center">
    System.out.println("hello world");
</pre>
</p>
<p class="text-center">
    <var>x</var>=<var>ab</var>+<var>y</var><br>
    <kbd>ctrl+L</kbd><br>
    <samp>System.out.println("hello world")</samp>
</p>
<table class="table text-center table-striped table-bordered table-hover table-condensed">
    <caption class="text-center" >喜欢玩的英雄</caption>
    <thead>
    <tr class="success">
    <th class="text-center">名称</th>
    <th class="text-center">类别</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td class="success">韩信</td>
        <td class="warning">刺客</td>
    </tr>
    <tr>
        <td class="active">花木兰</td>
        <td class="danger">战士</td>
    </tr>
    <tr>
        <td>马可波罗</td>
        <td>射手</td>
    </tr>
    </tbody>
</table>
<div class="table-responsive">
    <table class="table text-center table-striped table-bordered table-hover table-condensed">
        <caption class="text-center" >喜欢玩的英雄</caption>
        <thead>
        <tr class="success">
            <th class="text-center">名称</th>
            <th class="text-center">类别</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class="success">韩信</td>
            <td class="warning">刺客</td>
        </tr>
        <tr>
            <td class="active">花木兰</td>
            <td class="danger">战士</td>
        </tr>
        <tr>
            <td>马可波罗</td>
            <td>射手</td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>

效果图:

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

消白

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值