css-backgroundsizecover.js 306 B

12345678910
  1. // developer.mozilla.org/en/CSS/background-size
  2. Modernizr.testStyles( '#modernizr{background-size:cover}', function( elem ) {
  3. var style = window.getComputedStyle ?
  4. window.getComputedStyle( elem, null )
  5. : elem.currentStyle;
  6. Modernizr.addTest( 'bgsizecover', style.backgroundSize == 'cover' );
  7. });