Background fixed in HTML5 CSS3

2

I put a background x on my site, with the css code:

body
{
    background-image: url("../imagens/back.jpg");
    background-color: rgba(64, 118, 182, 1);
    background-repeat: no-repeat;
    background-size: auto;
}

I wanted the image not to repeat, but to be fixed on the screen, when the user rolled the scroll would not change the background of the site, the background would remain in place.

    
asked by anonymous 25.08.2015 / 00:55

1 answer

5

Add:

background-attachment: fixed;

See this W3C example

    
25.08.2015 / 00:59