试图了解如何pull-right
仅在 angular typeahead 下拉列表中实现该类。
问题:
- 输入位于窗口的 RHS(这是典型的搜索输入框)
- 我的结果比我的输入(和包含的 div)更宽
- 我需要下拉列表的右侧与输入框的右侧对齐,并在左侧延伸过去(下方)输入宽度。
- (下拉菜单只需要移动,其中的文本对齐方式不会改变,并且应该保持与左对齐。即不是这个问题中的 RTL:RTL for angularjs bootstrap's typeahead)
将pull-right
类应用于包含 div 似乎不会独立于输入影响下拉菜单。
我不知道还能把它放在哪里?
是否有控制下拉 div 对齐方式的 CSS 方法?
pull-right
在包含 div 中包含 类- 放置在包含 div 以缩小宽度(也许没有必要?)
如果您在 plunker 示例输入框中键入“ ang ”,您将看到结果溢出窗口的右侧。
<div class='column'>
<div class='container-fluid pull-right' ng-controller="TypeaheadCtrl">
<h4>Asynchronous results</h4>
<pre>Model: {{asyncSelected | json}}</pre>
<input type="text" ng-model="asyncSelected" placeholder="Locations loaded via $http" typeahead="address for address in getLocation($viewValue)" typeahead-loading="loadingLocations" class="form-control">
<i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>
</div>
</div>
我查看了以下问题,这些问题似乎对我没有帮助:
- SO issue 22075432 - typeahead-alignment-issue
- github引导问题2045