how to set background image in css responsive code example

Example 1: make a background image responsive css

html {
   min-height: 100%;
   background-image: url(image.jpg);
   background-size: cover;
   background-repeat: no-repeat;
   background-position: center center;
}

Example 2: how to cover whole webpage by background image in html

background: url(images/bg.jpg) no-repeat center center fixed; 
  background-size: cover;

Example 3: how to set background image in css responsive

body{
  background:url("images/xyz.jpg") no-repeat center;

Tags:

Html Example