1body {
2 background-position: center;
3 background-repeat: no-repeat;
4 background-size: cover;
5}
1body {
2 background: url(path/to/bg-image.jpg) no-repeat center center fixed;
3 background-size: cover;
4}
1<head>
2<style>
3#example1{
4 border: 2px solid black;
5 padding: 100px;
6 background: url(mountain.jpg);
7 background-repeat: no-repeat;
8 background-size: 100% 100%;
9}
10</style>
11</head>
12<body>
13<div id="example1">
14</div>
15</body>