Nem*_*man 5 html css forms angularjs twitter-bootstrap-3
我正在使用angularjs和bootstrap 3作为css构建一个Web应用程序(我对css的知识非常有限).我想创建一个内联表单,其中包含5个输入字段和标签,位于它们之上.第一场需要占据比其他场更多的空间.
我在这里尝试了一下:http ://plnkr.co/edit/a2p7RNy2SueH82WoSg5e?p=preview
这是我尝试的标记:
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" />
<form name="form" novalidate="" ng-submit="processForm()" class="form-inline">
<div class="form-group col-md-4">
<label class="control-label" for="location"><i class="glyphicon glyphicon-map-marker"></i> Location</label>
<input class="form-control" id="location" name="location" type="text" ng-model="location" ng-required="true" ng-autocomplete details="details" options="options" placeholder="Location" />
</div>
<div class="form-group col-md-4">
<label class="control-label" for="startDate"><i class="glyphicon glyphicon-calendar"></i> Pickup date</label>
<input class="form-control" id="startDate" name="startDate" type="text" datepicker-popup="{{format}}" ng-model="startDate" is-open="openedStart" datepicker-options="dateOptions" ng-required="true" close-text="Close" ng-click="openStart($event)" />
</div>
<div class="form-group col-md-3">
<label class="control-label" for="startTime"><i class="glyphicon glyphicon-time"></i> Pickup</label>
<select class="form-control" id="startTime" ng-model="selectedStartTime" ng-options="time.label for time in times" ng-required="true">
</select>
</div>
<div class="form-group col-md-4">
<label class="control-label" for="endDate"><i class="glyphicon glyphicon-calendar"></i> Dropoff date</label>
<input class="form-control" id="endDate" name="endDate" type="text" datepicker-popup="{{format}}" ng-model="endDate" is-open="openedEnd" min-date="startDate" datepicker-options="dateOptions" ng-required="true" close-text="Close" ng-click="openEnd($event)"
/>
</div>
<div class="form-group col-md-3">
<label class="control-label" for="endTime"><i class="glyphicon glyphicon-time"></i> Dropoff</label>
<select class="form-control" id="endTime" ng-model="selectedEndTime" ng-options="time.label for time in times" ng-required="true">
</select>
</div>
<div class="row align-center">
<input type="submit" value="Search" ng-disabled="form.$invalid" class="btn btn-primary" disabled="disabled" />
</div>
</form>Run Code Online (Sandbox Code Playgroud)
这是当前plnkr呈现标记的方式:

| 归档时间: |
|
| 查看次数: |
11346 次 |
| 最近记录: |