2014-12-19 53 views
1

我有一個有幾個垂直表單域的表單。我想編輯它以製作一系列水平和垂直表單字段。根據引導程序API(http://getbootstrap.com/css/#forms-control-sizes),您可以創建一個類如col-xs-4的類來編輯表單字段的長度,並且如果您選擇使其成爲可以水平分隔的表單。當我嘗試將某些字段水平放置時,我無法輸入字段。我嘗試使用CSS Z-index將它們提升到頂端,但這似乎不起作用。爲什麼我編輯表單長度的位置阻止了我在表單中輸入信息?

我的代碼與工作的兩個垂直的輸入字段:

.form{ 
 
     z-index: 12; 
 
    }
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> 
 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet"/> 
 
    <div class="container"> 
 
     <form id="questions" class="form col-xs-4" name="form" ng-submit="signUp()" novalidate> 
 
    
 
    
 
       <div class="form-group" ng-class="{ 'has-success': form.total.$valid && submitted, 
 
                'has-error': form.total.$invalid && submitted }"> 
 
        <label>Business Name</label> 
 
    
 
        <input type="text" name="total" class="form-control" ng-model="user.businessname" 
 
          required/> 
 
       </div> 
 
      
 
    
 
       <div class="form-group" ng-class="{ 'has-success': form.total.$valid && submitted, 
 
                'has-error': form.total.$invalid && submitted }"> 
 
        <label>Email</label> 
 
    
 
        <input type="text" name="total" class="form-control" ng-model="user.email" 
 
         required/> 
 
       </div> 
 
      </form> 
 
     </div>

我的代碼看起來正確的,但我不能輸入到他們兩個水平輸入字段;你可以看到我用z-index CSS包含在這一個:

.form{ 
 
     z-index: 12; 
 
    }
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet"/> 
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> 
 

 
<div class="container"> 
 
    <form id="questions" class="form" name="form" ng-submit="signUp()" novalidate> 
 

 
     <div class= "col-xs-4"> 
 
      <div class="form-group" ng-class="{ 'has-success': form.total.$valid && submitted, 
 
               'has-error': form.total.$invalid && submitted }"> 
 
       <label>Business Name</label> 
 

 
       <input type="text" name="total" class="form-control" ng-model="user.businessname" 
 
         required/> 
 
      </div> 
 
     </div> 
 

 
     <div class= "col-xs-4"> 
 
      <div class="form-group" ng-class="{ 'has-success': form.total.$valid && submitted, 
 
               'has-error': form.total.$invalid && submitted }"> 
 
       <label>Email</label> 
 

 
       <input type="text" name="total" class="form-control" ng-model="user.email" 
 
        required/> 
 
      </div> 
 
     </div> 
 
    </form> 
 
</div>

注:嘗試CSS既.FORM和.FORM組...

+0

當我在snipets中運行代碼(當前正在等待編輯的同行評審)時,無論佈局如何,我都可以輸入輸入。您所包含的代碼之外似乎存在某些問題會導致您遇到問題。 – adamdc78 2014-12-19 02:16:18

+0

感謝您的回覆。讓我分享一大段代碼然後: – rashadb 2014-12-19 02:50:16

+0

感謝您的迴應。如何添加/編輯已提交的代碼,或者是否需要開始一個全新的問題? – rashadb 2014-12-19 02:55:56

回答

0

引導是非常特別是如此

將創建上述錯誤。

相關問題