how to keep the background image stick to its ratio in changing height and width on change of page code example
Example: background image no repeat fill
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;
}