2015-11-20 98 views
0

內引導輸入水平對齊,我想一個微調對準剛剛輸入框右側,但它會下:無法獲得GIF與輸入組

<form> 
    <div class="form-group"> 
     <div class="input-group"> 
      <span class="input-group-addon"> 
       <i class="glyphicon glyphicon-search"></i> 
      </span> 
      <input type="text" class="form-control" placeholder="Search" ng-model="searchTerm" ng-change="FetchNearby(searchTerm)"> 
     </div> 
     <span><img alt="Logo" src="/Content/Images/ajax-loader.gif" /></span> 
    </div> 
</form> 

回答

0

這樣的事情?

https://jsfiddle.net/1e0v352r/

我添加了一個類你的跨度和移動它。輸入組

<form> 
    <div class="form-group"> 
     <div class="input-group"> 
      <span class="input-group-addon"> 
       <i class="glyphicon glyphicon-search"></i> 
      </span> 
      <input type="text" class="form-control" placeholder="Search" ng-model="searchTerm" ng-change="FetchNearby(searchTerm)"> 
       <span class="logo_right"><img alt="Logo" src="/Content/Images/ajax-loader.gif" /></span> 
     </div> 

    </div> 
</form> 

的內部增加了一些CSS來

.logo_right { 
    position: absolute; 
    right: 0; 
    top: 0; 
    z-index: 5; 
} 
+0

沒有運氣它定位與此同時,它將文本框放在左側,微調器放在屏幕的右側。有純粹的bootstrap解決方案嗎?我嘗試使用form-inline和pull-left而沒有成功 –