水平线总是出现在透明的离子导航条Iphone-Ionic中

时间:2015-03-15 02:41:30

标签: iphone ionic-framework ionic

我有一个问题,我无法解决,我会发疯,很简单,我相信有人解决了。我把照片放在上面,然后把我的酒吧设置为透明。这在我的浏览器预览中完美无效,但在我的iphone上无法正常工作,顶部会出现一条水平线。下面我展示了2张图片:

enter image description here

我到处都搜索过这个问题,没有人发生过,我想这是我的css问题或安装离子问题。

<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>Tabs Example</title>

    <link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
    <script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
  </head>

  <body>

    <ion-nav-bar class="bar-positive">
      <ion-nav-back-button>
      </ion-nav-back-button>
    </ion-nav-bar>

    <ion-nav-view></ion-nav-view>


    <script id="templates/tabs.html" type="text/ng-template">
      <ion-tabs class="tabs-icon-top tabs-positive">

        <ion-tab title="Home" icon="ion-home" href="#/tab/home">
          <ion-nav-view name="home-tab"></ion-nav-view>
        </ion-tab>
      </ion-tabs>
    </script>

    <script id="templates/home.html" type="text/ng-template">
      <ion-view view-title="Home">
        <ion-content scroll="false" style="top:0;">
          <div class="test"/>
        </ion-content>
      </ion-view>
    </script>


  </body>
</html>

CSS

.test {
  background-image: url('http://t2.gstatic.com/images?q=tbn:ANd9GcRvVuKoUrqOzAF16Zp-cgBGm6YuJ37x_peZJCHdSxjB88IYmn5g');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  height: 100%;
}

.bar.bar-positive {
  border-style: none;
  background-color: rgba(255,255,255,.01) !important;
}

JS

angular.module('ionicApp', ['ionic'])

.config(function($stateProvider, $urlRouterProvider) {

  $stateProvider
    .state('tabs', {
      url: "/tab",
      abstract: true,
      templateUrl: "templates/tabs.html"
    })
    .state('tabs.home', {
      url: "/home",
      views: {
        'home-tab': {
          templateUrl: "templates/home.html",
          controller: 'HomeTabCtrl'
        }
      }
    });


   $urlRouterProvider.otherwise("/tab/home");

})

.controller('HomeTabCtrl', function($scope) {
  console.log('HomeTabCtrl');
});

Here is the link to to see and execute my code

谢谢。任何帮助对我都有用。

1 个答案:

答案 0 :(得分:0)

你试过了吗?

.tabs {
  border: none;
}

或者,如果您希望背景透明:

.tabs {
  border: none;
  background: transparent !important;
  background-color: rgba(0,215,255,.66) !important; /* or transparent, or background:none */
}