使用bootstrap和栅格系统实现响应式的基础信息提交

2 篇文章 0 订阅
2 篇文章 0 订阅

使用bootstrap和栅格系统实现响应式的基础信息提交

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="lib/css/bootstrap.css">
    <title>Bootstrap栅格系统</title>
</head>
<body>
<div class="container">
    <form>
        <div class="form-row">
            <div class="form-group col-md-6">
                <lable for="loginId">账号</lable>
                <input type="email" id="loginId" placeholder="请输入登录账号" class="form-control">
            </div>

            <div class="form-group col-md-6">
                <lable for="password">密码</lable>
                <input type="password" id="password" placeholder="请输入登录密码" class="form-control">
            </div>
        </div>
        <div class="form-row">
            <div class="form-group col-md-6 col-lg-3 col-xl-3">
                <lable for="name">姓名</lable>
                <input type="text" id="name" placeholder="请输入姓名" class="form-control">
            </div>

            <div class="form-group col-md-6 col-lg-3 col-xl-3">
                <lable for="country">国家</lable>
                <input type="text" id="country" placeholder="请输入国家" class="form-control">
            </div>

            <div class="form-group col-md-6 col-lg-3 col-xl-3">
                <label for="city" style="margin-bottom:-8px">城市</label>
                <select class="form-control" id="city" >
                    <option>北京</option>
                    <option>上海</option>
                    <option>天津</option>
                    <option>重庆</option>
                    <option>四川</option>
                </select>
            </div>
            <div class="form-group col-md-6 col-lg-3 col-xl-3" >
                <lable for="postalcode">邮编</lable>
                <input type="text" id="postalcode" placeholder="请输入邮编" class="form-control">
            </div>
        </div>
        <div class="form-group" >
            <lable for="address">详细地址</lable>
            <textarea id="address" rows="3" cols="100%" class="form-control" placeholder="请输入详细地址"></textarea>
        </div>
        <div>请选择你的爱好</div>
        <div class="form-check form-check-inline">
            <input class="form-check-input" type="checkbox" id="checkbox1" value="option1">
            <label class="form-check-label" for="checkbox1">篮球</label>
        </div>
        <div class="form-check form-check-inline">
            <input class="form-check-input" type="checkbox" id="checkbox2" value="option2">
            <label class="form-check-label" for="checkbox2">羽毛球</label>
        </div>
        <div class="form-check form-check-inline">
            <input class="form-check-input" type="checkbox" id="checkbox3" value="option3">
            <label class="form-check-label" for="checkbox3">游泳</label>
        </div>
        <div class="form-group" >
            <lable for="submit"></lable>
            <input type="submit" id="submit" value="提交" class="form-control" style="background-color: #007aff;color: white">
        </div>
    </form>
</div>
</body>
</html>
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值