The website says it best:
Have you ever wanted to do if-statements in your CSS for the availability of cool features like
border-radius
? Well, with Modernizr you can accomplish just that!
Modernizr is a small (7kb) JavaScript file that checks the user’s browser and determines which advanced features are supported, then appends classes to the body
element like .borderradius
or .no-borderradius
. You can then target browsers with CSS like:
.borderradius h1{//styles you want these users to get...}
.no-borderradius h1{//and styles you want these users get...}
As an added bonus, Modernizr also adds HTML5 support similar to the IE Shiv!
Pretty cool stuff!
Happy Modernizing, and thanks for Dan “the Man” Mendelsohn for turning me on to this,
Atg