Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- <script src="scripts/modernizr-2.6.2-full.js"></script>
- <style>
- .box {
- width: 200px;
- height: 130px;
- padding: 10px;
- border: 1px solid black;
- border-radius: 15px;
- }
- .cssgradients .box {
- background: #ffffff; /* For old browsers */
- background: -moz-linear-gradient(top, #ffffff 1%, #000000 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#ffffff), color-stop(100%,#000000)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ffffff 1%,#000000 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ffffff 1%,#000000 100%); /* Opera 11.10+ */
- background: -ms-linear-gradient(top, #ffffff 1%,#000000 100%); /* IE10+ */
- background: linear-gradient(to bottom, #ffffff 1%,#000000 100%); /* W3C */
- }
- .no-cssgradients .box {
- background: url('gradient.png') 0 0 repeat-x;
- }
- .no-borderradius .box {
- behavior: url('scripts/PIE_uncompressed.htc');
- }
- </style>
- </head>
- <body>
- <script>
- /// Modernizr
- // polifill == shim == shiv
- //1.adds html5shiv if needed(html5 tags in old browsers IE)
- //2. Destect html 5 suport throught adding classes to the html element
- // class "js" if js is suported or "no-js" , canvas etc.
- // set classses for all supported (not - supported ) features included in installed packet
- //3. Yep/Nope loading of polifills
- // polifill for video tag ... polifill for canvas etc.
- if (Modernizr.canvas) {
- //use canvas
- } else {
- //use canvas alternative
- //or load polifill(modernizr polifills github) or other
- }
- Modernizr.load({
- test: Modernizr.audio,
- //yep: my_audio.js,
- nope: 'http://api.html5media.info/1.1.5/html5media.min.js' // i can load differ css here too
- });
- </script>
- <!--[if lt IE 9]>
- <script src="dist/html5shiv.js"></script>
- <![endif]-->
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment