博客列表 >bootstrap制作水平表单登陆页面-2018-9-26

bootstrap制作水平表单登陆页面-2018-9-26

THPHP
THPHP原创
2018年09月26日 08:33:58743浏览

HTML代码:

实例

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../lib/css/bootstrap.css">
    <title>水平表单登录</title>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-10 col-md-offset-2">
            <h2 class="text-center">用户登录</h2>
            <form class="form-horizontal">
                <div class="form-group">
                    <lable for="email" class="col-sm-2 control-label">邮箱</lable>
                    <div class="col-sm-8">
                        <input type="email" id="email" class="form-control" placeholder="Email">
                    </div>
                </div>
                <div class="form-group">
                    <lable for="password" class="col-sm-2 control-label">密码</lable>
                    <div class="col-sm-8">
                        <input type="password" id="password" class="form-control" placeholder="Password">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-8">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox" checked>记住密码
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-2">
                        <button type="button" class="btn btn-primary btn-block">登录</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

效果图:

TIM截图20180926083148.png

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议