Angular - Ionic:使选择下拉列表看起来像文本链接

时间:2016-11-02 21:05:21

标签: angularjs user-interface ionic-framework dropdown

所以我想让选择标记下拉列表看起来像普通文本链接,但点击后它仍然激活离子选择(移动下拉列表)功能。(http://ionicframework.com/docs/components/#select

下面的这个plunkr显示了我不想要的下拉框的外观。任何人都可以帮我把下拉框变成文字链接!

Get-ChildItem .png | foreach {
  Rename-Item $_ $_.Name.Replace("()", "")
}

https://plnkr.co/edit/A9ycYBKC1GUDhpCiskr5?p=preview

2 个答案:

答案 0 :(得分:1)

将以下内容添加到您的plunker中:

<style>
    select{
        -webkit-appearance:none;
        outline: none;
        border: none;
        background: none;
        color: blue;
        text-decoration: underline;
    }
</style>

答案 1 :(得分:0)

一种可能性是完全删除选择并使用无序列表进行模拟。 Example

  <a href="" ng-init="show = true" ng-click="show = !show">Link</a>
  <ul ng-if="show">
  <li ng-repeat="color in colors">
    <a href="" ng-click="setColor(color)">{{color.name}}</a>
  </li>
  </ul>