CodePen

HTML

            
              <div class="background">

</div>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              .background {
  width:960px;
  height:250px;
  margin:10px auto;
  background:lightgrey;
  background-image: url(http://lorempixel.com/output/abstract-q-c-320-175-6.jpg);
  background-size:contain;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................