【问题标题】:How can i make custom position of inputs dropdown in angular-material?如何在 angular-material 中自定义输入下拉菜单的位置?
【发布时间】:2016-06-30 09:28:34
【问题描述】:

我找到了'md-position-mode'指令,但它只适用于菜单('md-menu'),请帮我找到类似的输入下拉菜单

【问题讨论】:

  • 你在使用角度材料吗?请为其添加标签并在您的问题中提及它!
  • 是的,抱歉我没说
  • 我做到了,你能帮忙吗?))

标签: angularjs angularjs-directive frontend angular-material


【解决方案1】:

如果“输入下拉菜单”是指md-select,则可以将md-container-class 属性与一些CSS 结合使用-CodePen

标记

<md-input-container>
    <label>State</label>
    <md-select id="mySelect" ng-model="ctrl.userState" md-container-class="selectList">
      <md-option ng-repeat="state in ctrl.states" value="{{state.abbrev}}" ng-disabled="$index === 1">
        {{state.abbrev}}
      </md-option>
    </md-select>
</md-input-container>

CSS

.selectList {
  margin-left: 100px;
  margin-top: 50px;
}

md-select documentation

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-10-09
    • 1970-01-01
    • 2019-07-21
    • 1970-01-01
    • 1970-01-01
    • 2021-12-28
    • 1970-01-01
    • 2019-01-05
    相关资源
    最近更新 更多