Terep Terep - 6 months ago 11
CSS Question

Background image on phones looks shrinked

What changes do I implement so that the backgound image Back.jpg show fulls screen and the content scrolls, rigth now it only works on desktops
The content should scroll with the image remain full screen

the image is 1500 width by 1000 height, in phones the image looks shrinked, but on desktops looks fine.

<style>
html, body {
margin:0;
padding:0;
border:0;
height:100%;
background: url(Back.jpg) center no-repeat fixed;
}
</style>

Answer
<style>
    html, body {
        margin:0;
        padding:0;
        border:0;
        height:100%;
        background: url(Back.jpg) no-repeat center fixed;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
        background-size: cover;
    }
</style>