Three ways to use Modernizr

In the CSS:


.no-cssgradients .header {
  background: url("images/gradient.png");
}
.cssgradients .header {
  background-image: linear-gradient(blue, purple);
}

As a JavaScript object:


if (Modernizr.csstransforms) {
    newBrowsersDoThis();
  } else {
    oldBrowsersDoThis();
  }

Check for HTML element class:


 
// Modernizr adds the feature detected 
Read more