So here is the solution for how to add background for all size of devices in hybrid application.
So you have to add the following to CSS to your style.css
.BackgroundImage{
background: url(image.jpg) no-repeat center center fixed;
-webkit-background-size: contain;
-moz-background-size: contain;
-o-background-size: contain;
background-size:contain;
}
You have to add same css for your scroll content because above css will work only for the screen not for scroll-able screen .
.scroll-content{
background: url(image.jpg) no-repeat center center fixed;
-webkit-background-size: contain;
-moz-background-size: contain;
-o-background-size: contain;
background-size:contain;
}
Now this will work properly.
Note:- if background-size :contain not works then replace contain to cover. this is not working in some android version so you have to adjust according to them.
Bye.. till then keep Asking..
So you have to add the following to CSS to your style.css
.BackgroundImage{
background: url(image.jpg) no-repeat center center fixed;
-webkit-background-size: contain;
-moz-background-size: contain;
-o-background-size: contain;
background-size:contain;
}
You have to add same css for your scroll content because above css will work only for the screen not for scroll-able screen .
.scroll-content{
background: url(image.jpg) no-repeat center center fixed;
-webkit-background-size: contain;
-moz-background-size: contain;
-o-background-size: contain;
background-size:contain;
}
Now this will work properly.
Note:- if background-size :contain not works then replace contain to cover. this is not working in some android version so you have to adjust according to them.
Bye.. till then keep Asking..
0 comments