绘图示列
$(function(){
var canvas = $('#myCanvas');
canvas.attr("width",$(window).get(0).innerWidth)
canvas.attr("height",$(window).get(0).innerHeight)
var context = canvas.get(0).getContext("2d");
context.fillRect(0,0,canvas.width(),canvas.height());
$(window).resize(function(){
canvas.attr("width",$(window).get(0).innerWidth)
canvas.attr("height",$(window).get(0).innerHeight)
context.fillRect(0,0,canvas.width(),canvas.height());
});
});
*{margin:0;padding:0;}
html,body{height:100%;width:100%}
canvas{display:block;}
您的浏览器版本目前不支持HTML5