HTML5 canvas clearRect() 方法
2017-08-05 HTML5 canvas clearRect() 方法 HTML5 Canvas 参考手册 实例 在给定矩形内清空一个矩形: Your browser does not support the HTML5 canvas tag. JavaScript: var c=document.getElementById(myCanvas);var ctx=c.getContext(2d);ctx.fi
HTML5 canvas strokeRect() 方法
2017-08-05 HTML5 canvas strokeRect() 方法 HTML5 Canvas 参考手册 实例 绘制 150*100 像素的矩形: Your browser does not support the HTML5 canvas tag. JavaScript: var c=document.getElementById(myCanvas);var ctx=c.getContext(2d);ctx.strokeR
HTML5 canvas fillRect() 方法
2017-08-05 HTML5 canvas fillRect() 方法 HTML5 Canvas 参考手册 实例 绘制 150*100 像素的已填充矩形: Your browser does not support the HTML5 canvas tag. JavaScript: var c=document.getElementById(myCanvas);var ctx=c.getContext(2d); ctx
HTML5 canvas rect() 方法
2017-08-05 HTML5 canvas rect() 方法 HTML5 Canvas 参考手册 实例 绘制 150*100 像素的矩形: Your browser does not support the HTML5 canvas tag. JavaScript: var c=document.getElementById(myCanvas);var ctx=c.getContext(2d); ctx.rect(20,20,1
HTML5 canvas miterLimit 属性
2017-08-05 HTML 5 canvas miterLimit 属性 HTML5 Canvas 参考手册 实例 以最大斜接长度 5 绘制线条: Your browser does not support the canvas tag. JavaScript: var c=document.getElementById(myCanvas);var ctx=c.getContext(2d);ctx.lineWidt
HTML5 canvas lineWidth 属性
2017-08-05 HTML 5 canvas lineWidth 属性 HTML5 Canvas 参考手册 实例 用宽度为 10 像素的线条来绘制矩形: Your browser does not support the canvas tag. JavaScript: var c=document.getElementById(myCanvas);var ctx=c.getContext(2d); ct
HTML5 canvas lineJoin 属性
2017-08-05 HTML 5 canvas lineJoin 属性 HTML5 Canvas 参考手册 实例 当两条线条交汇时,创建圆形边角: Your browser does not support the canvas tag. JavaScript: var c=document.getElementById(myCanvas);var ctx=c.getContext(2d);ctx.b
HTML5 canvas lineCap 属性
2017-08-05 HTML 5 canvas lineCap 属性 HTML5 Canvas 参考手册 实例 绘制圆形的结束线帽: Your browser does not support the canvas tag. JavaScript: var c=document.getElementById(myCanvas);var ctx=c.getContext(2d);ctx.beginPath(); ctx.lin
HTML5 canvas addColorStop() 方法
2017-08-05 HTML5 canvas addColorStop() 方法 HTML5 Canvas 参考手册 实例 定义一个从黑到白的渐变,作为矩形的填充样式: Your browser does not support the HTML5 canvas tag. JavaScript: var c=document.getElementById('myCanvas')
HTML5 canvas createRadialGradient() 方法
2017-08-05 HTML5 canvas createRadialGradient() 方法 HTML5 Canvas 参考手册 实例 绘制一个矩形,并用放射状/圆形渐变进行填充: Your browser does not support the HTML5 canvas tag. JavaScript: var c=document.getElementById(myCan