Skip to content

Instantly share code, notes, and snippets.

View nextechu's full-sized avatar

Bruce Kyle nextechu

View GitHub Profile
.boxshadow #MyContainer {
border: none;
-webkit-box-shadow: #666 1px 1px 1px;
-moz-box-shadow: #666 1px 1px 1px;
}
.no-boxshadow #MyContainer {
border: 2px solid black;
}
<script>
Modernizr.load([ {
load: 'http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1.min.js',
complete: function () {
if (!window.jQuery) {
Modernizr.load('../Scripts/jquery-1.6.1.min.js');
}
}},
{
test: Modernizr.canvas,
Modernizr.load({
test: Modernizr.geolocation,
yep : 'geo.js',
nope: 'geo-polyfill.js'
});
Modernizr.load([{
test : /* boolean(ish) - Something that you want to test */,
yep : /* array (of strings) | string - The things to load if test is true */,
nope : /* array (of strings) | string - The things to load if test is false */,
both : /* array (of strings) | string - Load everytime (sugar) */,
load : /* array (of strings) | string - Load everytime (sugar) */,
callback : /* function ( testResult, key ) | object { key : fn } */,
complete : /* function */
}, ... ]);
<script src="modernizr.custom.89997.js"></script>
<script type="text/javascript">
if(Modernizr.fontface){
// font-face is supported
}
</script>
<script>
if ( navigator.userAgent.indexOf("MSIE")>0 ) {
// Run custom code for Internet Explorer.
}
</script>
<figure>
<video src="example.webm" controls></video>
<figcaption>Example</figcaption>
</figure>
<!doctype html>
<title>SVG in text/html</title>
<p>
A green circle:
<svg> <circle r="50" cx="50" cy="50" fill="green"/> </svg>
</p>
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Example document</title>
</head>
<body>
<p>Example paragraph</p>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Example document</title>
</head>
<body>
<p>Example paragraph</p>
</body>
</html>