bootstrap面板怎么用


本文摘自PHP中文网,作者(*-*)浩,侵删。

本章将讲解 Bootstrap 面板(Panels)。

面板组件用于把 DOM 组件插入到一个盒子中。(推荐学习:Bootstrap视频教程)

创建一个基本的面板,只需要向 <div> 元素添加 class .panel 和 class .panel-default 即可。

如下面的实例所示:

1

2

3

4

5

<div class="panel panel-default">

    <div class="panel-body">

        这是一个基本的面板

    </div>

</div>

面板标题

我们可以通过以下两种方式来添加面板标题:

使用 .panel-heading class 可以很简单地向面板添加标题容器。

使用带有 .panel-title class 的 <h1>-<h6> 来添加预定义样式的标题。

下面的实例演示了这两种方式:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

<div class="panel panel-default">

    <div class="panel-heading">

        不带 title 的面板标题

    </div>

    <div class="panel-body">

        面板内容

    </div>

</div>

  

<div class="panel panel-default">

    <div class="panel-heading">

        <h3 class="panel-title">

            带有 title 的面板标题

        </h3>

    </div>

    <div class="panel-body">

        面板内容

    </div>

</div>

更多Bootstrap相关技术文章,请访问Bootstrap教程栏目进行学习!

以上就是bootstrap面板怎么用的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

bootstrap 为什么只能默认12列

bootstrap干什么用的

bootstrap有什么ui框架?

bootstrap什么时候开源的

easyui和bootstrap之间有什么区别?

bootstrap 怎么隐藏元素

bootstrap4如何设置模态框

bootstrap4.5栅格系统的任意列问题怎么解决?

bootstrap如何设置表单必填

统计学bootstrap用于解决什么问题

更多相关阅读请进入《bootstrap》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...