Paracosmiste
0
Q:

css background image cover

body {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
1
body {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
2
body, html {
  height: 100%;
}

.bg {
  /* The image used */
  background-image: url("img_girl.jpg");

  /* Full height */
  height: 100%;

  /* Center and scale the image nicely */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
1
html { 
  background: url(images/bg.jpg) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
0

    #example1 {
  background: url(mountain.jpg);
  
    background-repeat: no-repeat;
  background-size: auto;

    }

#example2 {
  
    background: url(mountain.jpg);
  background-repeat: 
    no-repeat;
  background-size: 300px 100px;
} 
-1
background-size: 100px 50px; /* 100px wide, 50px tall */
9

New to Communities?

Join the community