e.k
e.k

Reputation: 1363

How to set image for whole ionic 3 app?

How can I set an image as a background for the whole application? I tried to set in ion-content but it set an image to content only. It omits header and tabs. I want to set it for the whole view. For that I have tired in ion-page, .tabs, .show-tab but nothing helps. Can anyone help me with this, please?

Upvotes: 0

Views: 354

Answers (3)

Akj
Akj

Reputation: 7231

This will set the background for the full content area.

.scroll-content {
        background: url(image);
      }

Upvotes: 0

user4799206
user4799206

Reputation:

Header and Tabs are the components simply put over the content, that is, you cannot combine them with content but you can make them transparent to make underlying image visible.

<ion-header no-border>
  <ion-navbar transparent>
    <ion-title>Meu App</ion-title>
  </ion-navbar>
</ion-header> 

Like this, or just use the css to make it as you wish.

Upvotes: 1

Dhara Gadhiya
Dhara Gadhiya

Reputation: 111

For this you can set background image in .ion-page class and then after set background-color:transparent for content, header and tabs main class.

Upvotes: 1

Related Questions