Hessius
Hessius

Reputation: 1394

How to set transition background in jQuery Mobile?

During some of the page transitions (for example during the turn and flow transitions) in jQuery Mobile a blank background/page is shown during the transitions.

For reference see: http://jquerymobile.com/demos/1.1.0/docs/pages/page-transitions.html

How does one change that blank background?

EDIT: Here's a JSfiddle to illustrate what I mean: http://jsfiddle.net/4ayER/

Upvotes: 4

Views: 2370

Answers (2)

molli
molli

Reputation: 313

since using !important is not a best practice in CSS, you can avoid using it by adding this rule in your css: .ui-body-c, .ui-overlay-c { background-color: blue; }

Upvotes: 3

Ben Clayton
Ben Clayton

Reputation: 82209

I believe you can just set CSS for the body element:

body {
 background-color: blue !important;
}

EDIT: turns out it needs the !important part.

See here http://jsfiddle.net/4ayER/2/

Upvotes: 10

Related Questions