<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> IE8支持HTML5+CSS3 </TITLE>
<!--[if IE]>
<script type="text/javascript" src="html5.js"></script>
<script type="text/javascript" src="excanvas.compiled.js"></script>
<script type="text/javascript" src="PIE.htc"></script>
<![endif]-->
<head>
<style type="text/css">
body {
background: #444;
color: #FFF;
font-family: Helvetica, Arial, sans-serif;
text-align: center;
}
#cv {
width: 600px; height: 400px;
background: #000;
border-radius: 20px;
padding: 20px;
margin: 20px auto;
box-shadow: 0 0 40px #222;
}
</style>
<script type="text/javascript">
function test() {
var ctx = document.getElementById("cv").getContext("2d");
ctx.fillStyle = "#aa0000";
ctx.beginPath();
ctx.arc(100, 100, 25, 0, Math.PI*2, true);
ctx.closePath();
ctx.fill();
var canvas=document.getElementById('myCanvas');
var ctx=canvas.getContext('2d');
ctx.fillStyle='#FF0000';
ctx.fillRect(0,0,80,100);
}
window.onload = test;
</script>
</head>
<body>
<canvas id="myCanvas">your browser does not support the canvas tag </canvas>
42 <canvas id="cv"></canvas>
43 </body>