<div></div>
div {
    width: 200px;
    height: 200px;
    margin: 10px auto;
	background: #aaa;
}

.linear-gradient div{
	background: linear-gradient(90deg, #888, #ccc);
}
View Compiled
if (Modernizr.testAllProps('background', 'linear-gradient(90deg, #888, #ccc)')) {
    $('html').addClass('linear-gradient');
}

// var root = document.documentElement;
// root.style.backgroundImage = 'linear-gradient(90deg, #888, #ccc)';

// if(root.style.backgroundImage) {
//   $('html').addClass('linear-gradient');
// }
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.js
  2. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js