【问题标题】:Why the list item is under the title tab?为什么列表项位于标题选项卡下?
【发布时间】:2016-05-25 01:11:45
【问题描述】:

我正在开发 Ionic 应用程序,但我不知道为什么
列表项不可见,为什么它位于标题选项卡下?

Here is the link of code.

https://jsfiddle.net/jneypysb/

【问题讨论】:

    标签: ionic-framework


    【解决方案1】:

    我使用 <ion-header-bar><ion-content>has-header 类,我解决了。

    因为您声明了<body ng-app="Hungroo">,所以必须定义这些模块。

    下面是一个完整的例子:

    angular.module('Hungroo', ['ionic']);
    <html>
    
    <head>
      <meta charset="utf-8">
      <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
      <link href="http://code.ionicframework.com/nightly/css/ionic.min.css" rel="stylesheet">
      <script src="http://code.ionicframework.com/nightly/js/ionic.bundle.min.js"></script>
    </head>
    
    <body ng-app="Hungroo">
      <ion-header-bar class="bar bar-header bar-royal">
        <button class="button button-icon icon ion-navicon"></button>
        <div class="h1 title">title</div>
        <button class="button button-icon icon ion-settings"></button>
      </ion-header-bar>
      <ion-content class="has-header">
        <div class="padding">
          <div class="list">
            <label class="item item-input item-select">
              <div class="input-label">
                First Things First!
              </div>
              <select>
                <option>one</option>
                <option>two</option>
                <option>three</option>
                <option>four</option>
              </select>
            </label>
          </div>
        </div>
      </ion-content>
    </body>
    
    </html>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-08
      • 2020-10-04
      • 2018-05-12
      • 1970-01-01
      • 1970-01-01
      • 2017-03-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多