I have designed a website which is responsive. I am using fixed background image in some of my web pages. Issue is, on mobile screen the image is not responsive, it's going outside the boundary(content). .. I have googled to find out a reason but the only way that i found there was to convert image to wbmp format.
When i convert the image into wbmp, the html didn't accept at all.
..
Any idea to let the image display on small screens in responsive manner?
Or any tool that i should use?
css
body{
background:url(../images/gallery-1-big.jpg) center center fixed no-repeat;
background-size:cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
-webkit-backface-visibility: hidden;
opacity: 0.8;
}
The same piece of code for mobile screen let the image get distorted and when i tried the below piece of code then the image shows but only on top half of screen
@media (max-width: 480px) {
body
{
background:url(../images/gallery-1-big.jpg) fixed no-repeat;
background-size:100%;
}