Ionic How to keep a fixed background while viewing views

I use the tab template for the Ionic project and set the background image. However, when transitional states occur, the background also depends on the animation. I want the background to always remain fixed for the entire application (in transition states and sub-states).

This project illustrates the problem:

link: http://codepen.io/anon/pen/ogYymB

I also tried to assign a background property to the body, but it does not work.

So, does anyone know how to always capture a background image and only animate the content?

0
source share
3 answers

, - - 14, , , CSS.

:

http://codepen.io/andrewmcgivery/pen/azBjdB

CSS:

body {
    background: 
url(http://cdn.wonderfulengineering.com/wp-content/uploads/2014/07/background-wallpapers-32.jpg) ;
    background-attachment:fixed;
    background-position: center;
}

body .view-container.tab-content {
  background-color: transparent;
}

body .pane, .menu, .view, .list, .item       {
    background: transparent;
}
+1

, , , javascript. url (, "/sign-in" ), html , html- , . html . , , () div html . , .

0

I had a similar problem and the only thing I did was change the scss style to include the following class:

.transparent      {
    background: transparent;
}

What I added to the ionic form.

0
source

All Articles