将图像设置为背景不起作用

时间:2017-10-06 16:20:01

标签: html css ionic-framework sass ionic2

我正在登录表单上工作,我希望在输入区域后面有一个图像作为背景。我不知道它是否由于代码而无法工作,或者因为我在错误的文件夹中完成了图像。 Atm图像位于资源文件夹中。

HTML

<ion-content class="background">

<ion-card>
 <ion-card-header>
   Login
</ion-card-header>

      <ion-list>
        <ion-item>
        <ion-label floating>Username</ion-label>
        <ion-input type="text" value=""></ion-input>
      </ion-item>

      <ion-item>
        <ion-label floating>Password</ion-label>
        <ion-input type="password" value=""></ion-input>
      </ion-item>
      </ion-list>
  </ion-card>
     <a> Forgot your password? Get help here </a>
     <button ion-button full round color="rank">Register</button>
</ion-content>

SCSS

  page-home {



    background{
        background-image: url('../assets/login.jpg');
    }

    .button{
        top: 90px;

}

}

0 个答案:

没有答案