2017-01-25 10 views
0

私は内容に問題があります。コンテンツは自動的に埋め込まれ、コンテンツの上にコンテンツを残すことはできません。イオン含有量は自動的に埋められます

これは.htmlを

<ion-header class="header-profile"> 
    <ion-toolbar class="bar-profile"> 
    <ion-item no-lines class="item-bar-profile"> 
     <ion-avatar > 
     <img class="centered" src="./assets/img/pio.jpg"> 
     </ion-avatar> 
     <span class="user-title centered">Don Pio</span> 
     <span class="user-info centered">Alboraya. Spain</span> 
    </ion-item> 
    </ion-toolbar> 
</ion-header> 

<ion-content class="content-profile"> 
    <div> 
    <ion-segment [(ngModel)]="profile"> 
     <ion-segment-button value="info"> 
     Perfil 
     </ion-segment-button> 
     <ion-segment-button value="config"> 
     Configuración 
     </ion-segment-button> 
    </ion-segment> 
    </div> 

    <div [ngSwitch]="profile"> 

    <ion-list *ngSwitchCase="'info'"> 
     <ion-item> 
     <ion-thumbnail item-left> 
      <img src="./assets/img/pio.jpg"> 
     </ion-thumbnail> 
     <h2>Ruby</h2> 
     </ion-item> 

    </ion-list> 

    <ion-list *ngSwitchCase="'config'"> 
     <ion-item> 
     <ion-thumbnail item-left> 
      <img src="./assets/img/pio.jpg"> 
     </ion-thumbnail> 
     <h2>Luna</h2> 
     </ion-item> 
    </ion-list> 
    </div> 
</ion-content> 

であり、これはこれは、セグメントが中央に水増しされますどのように参照するにはスクリーンショットです.scssスタイルシート

page-profile { 

     ion-avatar img { 
     width: 80px !important; 
     height: 80px !important; 
     } 

     .user-title { 
     color: white; 
     font-size: large; 
     font-weight: bold; 
     } 
     .user-info{ 
     color: white; 
     font-size: smaller; 
     } 
     .centered{ 
     margin-left: auto; 
     margin-right: auto; 
     display: block; 
     text-align: center; 
     } 

     .header-profile{ 
     height: 150px; 
     } 

     .bar-profile{ 
     height: 150px; 
     } 

     .bar-profile .toolbar-background { 

     background-size: cover; 
     background-image: url('../assets/img/pio.jpg'); 
     background-position: center center; 
     background-repeat: no-repeat; 
     background-color: black; 
     opacity: .5; 
     } 

     .item-bar-profile{ 
     background-color: transparent; 
     } 
     .content-profile{ 
     top:150px; 
     background-color: lightgrey; 
     } 
    } 

です。 screenshot

そして、これは間違っているだろう何が正しいvisualitation

enter image description here

だろうかありますか?

答えて

0

.content-profile{ 
    top:0px !important; 
    background-color: lightgrey; 
    padding: 0px !important; 
    } 
+0

が私のために動作しません。このCSSで試してみてください。他のアイデア? – Hanzo

+0

要件のイメージを掲載できますか? –

+0

元の質問を有効な再検索のスクリーンショットで更新しました。ありがとう – Hanzo

関連する問題