【问题标题】:cannot get label to be inline with angular-ui-select object无法使标签与 angular-ui-select 对象内联
【发布时间】:2015-06-28 23:57:55
【问题描述】:

我试图让标签位于 angular-ui-select 下拉列表的左侧,但无论我尝试什么,它都会一直出现在标签下方。我最近拉下了最新的 angular-ui-select。我使用的是 selectize 主题,但 bootstrap 主题也发生了同样的事情。

我在我的 HTML 中做错了吗?我只是没看到。

这是我的 HTML 正文:

<body>
<div ng-controller="MainCtrl">
    <div id="acct">
        <label for="acctList">Account:</label>
        <ui-select id="acctList" ng-model="acctList.selected" style="width: 250px;" theme="selectize" ng-disabled="disabled" title="Choose an account">
            <ui-select-match placeholder="Select or search an account in the list...">{{$select.selected.name}}</ui-select-match>
            <ui-select-choices repeat="account in acctList | filter: $select.search">
                <span ng-bind-html="account.name | highlight: $select.search"></span>
            </ui-select-choices>
        </ui-select>
    </div>
</div>
</body>

非常感谢任何帮助。谢谢

【问题讨论】:

    标签: angular-ui-select


    【解决方案1】:

    在做了更多的搜索和实验并使用了 Firebug 之后,我发现 ui-select 是由 div 组成的。我可以通过添加将标签放在下拉列表的左侧:

    display:inline-block; vertical-align:middle 
    

    ui-select的样式属性。

    (无法发图)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-17
      • 2018-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多