Keep background image fixed during scroll using css

How do I keep the background image fixed during a page scroll? I have this CSS code, and the image is a background of the body and not <div></div>

body {
  background-position:center;
  background-image:url(../images/images5.jpg);
}

Solution 1:

background-attachment: fixed;

http://www.w3.org/TR/CSS21/colors.html#background-properties

Solution 2:

background-image: url("/your-dir/your_image.jpg");
min-height: 100%;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
background-size: cover;}

Solution 3:

Just add background-attachment to your code

body {
    background-position: center;
    background-image: url(../images/images5.jpg);
    background-attachment: fixed;
}