bootstrap表单怎么居中


当前第2页 返回上一页

实例:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

<!DOCTYPE html>

<html>

<head>

    <meta charset="utf-8">

    <title>Bootstrap 实例 - 水平表单</title>

    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"

    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>

    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

</head>

<body>

 

<form class="form-horizontal" role="form">

    <div class="form-group">

        <label for="firstname" class="col-sm-2 control-label">名字</label>

        <div class="col-sm-10">

            <input type="text" class="form-control" id="firstname"

                   placeholder="请输入名字">

        </div>

    </div>

    <div class="form-group">

        <label for="lastname" class="col-sm-2 control-label">姓</label>

        <div class="col-sm-10">

            <input type="text" class="form-control" id="lastname"

                   placeholder="请输入姓">

        </div>

    </div>

    <div class="form-group">

        <div class="col-sm-offset-2 col-sm-10">

            <div class="checkbox">

                <label>

                    <input type="checkbox"> 请记住我

                </label>

            </div>

        </div>

    </div>

    <div class="form-group">

        <div class="col-sm-offset-2 col-sm-10">

            <button type="submit" class="btn btn-default">登录</button>

        </div>

    </div>

</form>

 

</body>

</html>

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

以上就是bootstrap表单怎么居中的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

为什么bootstrap图标无法显示

bootstrap input不可编辑的实现方法

bootstrap的组件有哪些?

bootstrap怎么实现可关闭tab

bootstrap可以用于移动端吗

bootstrap删格系统如何理解

bootstrap基本样式介绍

bootstrap轮播怎么停止自动轮播

为什么前端不用bootstrap

使用bootstrap框架的好处是什么

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




打赏

取消

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

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

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

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

评论

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