codepen.io/Anna_Batura/pen/ZQYWVN
.img{
background-image: url(img.jpg);
-moz-background-size: cover;
-o-background-size: cover;
-webkit-background-size: cover;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
width: 100%;
height: 300px;
}