Last active
December 20, 2015 16:29
-
-
Save allenyang79/6162028 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="ie ie6 lte9 lte8 lte7 no-js"> <![endif]--> | |
<!--[if IE 7]> <html class="ie ie7 lte9 lte8 lte7 no-js"> <![endif]--> | |
<!--[if IE 8]> <html class="ie ie8 lte9 lte8 no-js"> <![endif]--> | |
<!--[if IE 9]> <html class="ie ie9 lte9 no-js"> <![endif]--> | |
<!--[if gt IE 9]> <html class="ie no-js"> <![endif]--> | |
<!--[if !IE]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<style> | |
/* | |
.box { | |
-moz-border-radius: 15px; | |
-webkit-border-radius: 15px; | |
border-radius: 15px; | |
behavior: url(http://fetchak.com/ie-css3/ie-css3.htc); | |
} | |
*/ | |
.box | |
{ | |
-moz-border-radius: 15px; | |
-webkit-border-radius: 15px; | |
border-radius: 15px; | |
width:100px; | |
height:100px; | |
border:1px solid dashed; | |
background:#f99; | |
behavior: url(ie-css3.htc); | |
} | |
#canvasContainer p{ | |
display: none; | |
} | |
.canvastext #canvasContainer .supported { | |
display: block; | |
} | |
.no-canvastext #canvasContainer .noSupported { | |
display: block; | |
} | |
</style> | |
<script> | |
if (Modernizr.canvas) { //判斷瀏覽器是否支援 canvas | |
alert("support canvas"); | |
}else{ | |
alert("unsupport canvas"); | |
} | |
</script> | |
<body> | |
<div id="canvasContainer"> | |
<canvas id="canvas"></canvas> | |
<p class="canvas supported">瀏覽器支援 canvastext</p> | |
<p class="noSupported">瀏覽器不支援 canvastext!</p> | |
<hr> | |
<div class="box"></div> | |
</div> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<link href="c/c.css" rel="stylesheet"> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript"></script> | |
<style> | |
</style> | |
</head> | |
<body> | |
<h1>Hello World</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment