Canvas使用前需要获得上下文环境,暂不支持 3D。
常用API:
1. fillRect(x,y,width,height) 实心矩形。
2. strokeRect(x,y,width,height) 空心矩形。
3. fillText( "Hello world" , 200 , 200 ) 实心文字。
4. strokeText( "Hello world" , 200 , 300 ) 空心文字。
新标签兼容低版本:
1. IE 9 之前版本通过 createElement 创建 html5 新标签。
<!--[if lt IE9]>
<script>
(function() {
if (!0) return;
var e = "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark, menu, meter, nav, output