<html>
<head>
<style>
#example1 {
border: 2px solid black;
padding: 25px;
background: url(mountain.jpg);
background-repeat: no-repeat;
background-size: cover;
}
</style>
</head>
<body>
<h2>background-size: cover:</h2>
<div id="example1">
<h2>Hello World</h2>
<p>The background image is resized to cover the entire container, even if it has to stretch the image or cut a little bit off one of the edges.</p>
</div>
</body>
</html>