首页 > 代码库 > 【Bootstrap3.0建站笔记一】表单元素排版

【Bootstrap3.0建站笔记一】表单元素排版

1、文字和输入框前后排列:


代码:

 <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h2>条件查找</h2>
                </div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-lg-4 col-sm-8 col-xs-8 col-xxs-12">
                            <div class="form-horizontal">
                                <div class="form-group">
                                    <div class="col-md-4 control-label" for="select">归属地</div>
                                    <div class="col-md-4">
                                        <asp:DropDownList ID="ddlsheng" DataTextField="name" DataValueField="id" runat="server"
                                            AutoPostBack="True" OnSelectedIndexChanged="ddlsheng_SelectedIndexChanged" CssClass="form-control">
                                             <asp:ListItem Value=http://www.mamicode.com/"0">全国>

2、文字和输入框上下排列:



代码:

<div class="row">
                                                            <div class="form-group col-sm-4">
                                                                <div>司机姓名</div>
                                                                <asp:TextBox ID="txt_DriverName" runat="server" class="form-control "></asp:TextBox>
                                                            </div>
                                                            <div class="form-group col-sm-4">
                                                                <div>司机工号</div>
                                                                <asp:TextBox ID="txt_Ucode" runat="server" class="form-control "></asp:TextBox>
                                                            </div>
                                                            <div class="form-group col-sm-2">
                                                                <div>归属地</div>
                                                                <asp:DropDownList ID="ddlshengAdd" runat="server" CssClass="form-control  " OnSelectedIndexChanged="ddlshengAdd_SelectedIndexChanged" AutoPostBack="true">
                                                                     <asp:ListItem Value=http://www.mamicode.com/"0">全省>