Skip to content

Instantly share code, notes, and snippets.

@wlyecn
Last active January 1, 2016 12:19
Show Gist options
  • Save wlyecn/8144258 to your computer and use it in GitHub Desktop.
Save wlyecn/8144258 to your computer and use it in GitHub Desktop.
<script src="js/modernizr-x.x.x.js"></script>
<html class="no-js">
<html class="js flexbox canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange
history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity
cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface video audio
localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths">
input:valid, textarea:valid { }
input:invalid, textarea:invalid {
border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red;
}
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
Modernizr.load({
test: Modernizr.geolocation,
yep : 'geo.js',
nope: 'geo-polyfill.js',
complete: function(){
init();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment