Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Mobile - Make Background Image responsive

I have used Jquery Mobile. I have added background image like this<body background ="6.jpg">.

I want to make background image responsive. What process should i follow to make it responsive? Please Suggest.

Update

I have tried using this

body {
    background: url(6.jpg) ;
   background-size:cover; 



}
.ui-page {
    background: transparent;
     background-repeat: no-repeat;
}
.ui-content{
    background: transparent;
}

followed this link Stacjoverflow

but failed. Width of the image is responsive but height is getting too smaller than the original image.

like image 251
insanity Avatar asked Feb 19 '26 11:02

insanity


1 Answers

You can working for example with this: http://jquerypicture.com/

The important think is (generell for responsive) you must working with media queries.

PS: Instead of seeting the background in the body tag, please use a class for this.

like image 128
Manu Zi Avatar answered Feb 22 '26 04:02

Manu Zi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!