CSS background-size:cover

Imagem a ocupar a largura do elemento.

by Salustiano Silva

HTML

<div class="minhaClass">
    
</div>

CSS

div{
    width:100%;
    height:560px;
}
.minhaClass{
    background: url(http://i.imgur.com/UCUxIzE.png) no-repeat center center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}