ionic select

ionic select 的 select 相比原生的要更加美观些。但是弹出的可选选项样式是浏览器默认的。

每个平台上的可选项样式都是不一样的,在PC电脑的浏览器上,你会看到传统的下拉界面,Android 上会弹出单选按钮选项,iOS 有个滚轮操作界面。

实例

<html ng-app="ionicApp">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
        <title>芝麻教程(web3.xin)</title>
        <link href="/ionic/css/ionic.min.css" rel="stylesheet">
        <script src="/ionic/js/ionic.bundle.min.js"></script>
    </head>
    <body>
    
    <div class="bar bar-header">
      <div class="h1 title">Select</div>
    </div>

    <div class="content-wrapper">
      <div class="content has-header">

        <div class="list">

          <div class="item item-input item-select">
            <div class="input-label">
              Lightsaber
            </div>
            <select>
              <option>Blue</option>
              <option selected="">Green</option>
              <option>Red</option>
            </select>
          </div>

          <div class="item item-input item-select">
            <div class="input-label">
              Fighter
            </div>
            <select>
              <option>ARC-170</option>
              <option>A-wing</option>
              <option>Delta-7</option>
              <option>Naboo N-1</option>
              <option>TIE</option>
              <option selected="">X-wing</option>
              <option>Y-wing</option>
            </select>
          </div>

          <div class="item item-input item-select">
            <div class="input-label">
              Droid
            </div>
            <select>
              <option>2-1B</option>
              <option>B1</option>
              <option>C-3PO</option>
              <option>IG-88</option>
              <option>IT-O</option>
              <option selected="">R2-D2</option>
            </select>
          </div>

          <div class="item item-input item-select">
            <div class="input-label">
              Planet
            </div>
            <select>
              <option>Alderaan</option>
              <option selected="">Dagobah</option>
              <option>Felucia</option>
              <option>Geonosis </option>
              <option>Hoth</option>
              <option>Kamino</option>
              <option>Mygeeto</option>
              <option>Naboo</option>
              <option>Tataouine</option>
              <option>Utapau</option>
              <option>Yavin</option>
            </select>
          </div>

        </div>

      </div>
    </div>
  </body>
</html>

联系我们

邮箱 626512443@qq.com
电话 18611320371(微信)
QQ群 235681453

Copyright © 2015-2024

备案号:京ICP备15003423号-3