词条

大约有 3,000 项符合查询结果 ,库内数据总量为 78,408 项。(搜索耗时:0.0035秒)

681.HTML canvas clearRect() 方法

HTML canvas clearRect() 方法 HTML canvas 参考手册 实例 在给定矩形内清空一个矩形 JavaScript: var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.fillStyle="red"; ctx.fillRect(0,0,300,150); ctx.clearRect(20,20,100,50); 尝试一下 » 浏览器支持 Inter...

https://www.w3cschool.cn/htmltags/canvas-clearrect.html

682.HTML canvas fill() 方法

HTML canvas fill() 方法 HTML canvas 参考手册实例绘制 150*100 像素的矩形,然后用红色来给它填色:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.rect(20,20,150,100);ctx.fillStyle="red";ctx.fill();尝试一下 »浏览器支持Internet Explorer 9、Fi...

https://www.w3cschool.cn/htmltags/canvas-fill.html

683.HTML canvas arcTo() 方法

HTML canvas arcTo() 方法 HTML canvas 参考手册实例JavaScript:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.beginPath(); ctx.moveTo(20,20); // Create a starting pointctx.lineTo(100,20); // Create a horizontal linectx.arcTo(150,20,150,70,50); // C...

https://www.w3cschool.cn/htmltags/canvas-arcto.html

684.HTML canvas isPointInPath() 方法

HTML canvas isPointInPath() 方法 HTML canvas 参考手册实例如果点 20,50 位于当前路径中,则绘制一个矩形:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.rect(20,20,150,100);if (ctx.isPointInPath(20,50)) { ctx.stroke(); };尝试一下 »浏览...

https://www.w3cschool.cn/htmltags/canvas-ispointinpath.html

685.HTML canvas scale() 方法

HTML canvas scale() 方法 HTML canvas 参考手册实例绘制矩形,放大到 200%,然后再次绘制矩形:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.strokeRect(5,5,25,15);ctx.scale(2,2);ctx.strokeRect(5,5,25,15);尝试一下 »浏览器支持Internet Explorer ...

https://www.w3cschool.cn/htmltags/canvas-scale.html

686.HTML canvas rotate() 方法

HTML canvas rotate() 方法 HTML canvas 参考手册实例将矩形旋转 20 度:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.rotate(20*Math.PI/180);ctx.fillRect(50,20,100,50);尝试一下 »浏览器支持Internet Explorer 9、Firefox、Opera、Chrome 和 Safari 支持...

https://www.w3cschool.cn/htmltags/canvas-rotate.html

687.HTML canvas translate() 方法

HTML canvas translate() 方法 HTML canvas 参考手册 实例 在位置 (10,10) 处绘制一个矩形,将新的 (0,0) 位置设置为 (70,70)。再次绘制新的矩形(请注意现在矩形从位置 (80,80) 开始绘制): JavaScript: var c=document.getElementById("myCanvas"); var ctx=c....

https://www.w3cschool.cn/htmltags/canvas-translate.html

688.HTML canvas setTransform() 方法

HTML canvas setTransform() 方法 HTML canvas 参考手册实例绘制一个矩形,通过 setTransform() 重置并创建新的变换矩阵,再次绘制矩形,重置并创建新的变换矩阵,然后再次绘制矩形。请注意,每当您调用 setTransform() 时,它都会重置前一个...

https://www.w3cschool.cn/htmltags/canvas-settransform.html

689.HTML canvas font 属性

HTML canvas font 属性 HTML canvas 参考手册 实例 在画布上写一段 30 像素的文本,使用的字体是 "Arial":JavaScript: var c=document.getElementById("myCanvas");var ctx=c.getContext("2d"); ctx.font="30px Arial";ctx.fillText("Hello World",10,50); 尝试一下 » 浏览器支...

https://www.w3cschool.cn/htmltags/canvas-font.html

690.HTML canvas stroke() 方法

HTML canvas stroke() 方法 HTML canvas 参考手册实例绘制一条路径,形状是红色的字母 L:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.beginPath();ctx.moveTo(20,20);ctx.lineTo(20,100);ctx.lineTo(70,100);ctx.strokeStyle="red";ctx.stroke();尝试一下 »...

https://www.w3cschool.cn/htmltags/canvas-stroke.html

抱歉,暂时没有相关的微课

w3cschool 建议您:

  • 检查输入的文字是否有误

抱歉,暂时没有相关的视频课程

w3cschool 建议您:

  • 检查输入的文字是否有误

抱歉,暂时没有相关的教程

w3cschool 建议您:

  • 检查输入的文字是否有误

681.HTML canvas clearRect() 方法

HTML canvas clearRect() 方法 HTML canvas 参考手册 实例 在给定矩形内清空一个矩形 JavaScript: var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.fillStyle="red"; ctx.fillRect(0,0,300,150); ctx.clearRect(20,20,100,50); 尝试一下 » 浏览器支持 Inter...

https://www.w3cschool.cn/htmltags/canvas-clearrect.html

682.HTML canvas fill() 方法

HTML canvas fill() 方法 HTML canvas 参考手册实例绘制 150*100 像素的矩形,然后用红色来给它填色:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.rect(20,20,150,100);ctx.fillStyle="red";ctx.fill();尝试一下 »浏览器支持Internet Explorer 9、Fi...

https://www.w3cschool.cn/htmltags/canvas-fill.html

683.HTML canvas arcTo() 方法

HTML canvas arcTo() 方法 HTML canvas 参考手册实例JavaScript:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.beginPath(); ctx.moveTo(20,20); // Create a starting pointctx.lineTo(100,20); // Create a horizontal linectx.arcTo(150,20,150,70,50); // C...

https://www.w3cschool.cn/htmltags/canvas-arcto.html

684.HTML canvas isPointInPath() 方法

HTML canvas isPointInPath() 方法 HTML canvas 参考手册实例如果点 20,50 位于当前路径中,则绘制一个矩形:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.rect(20,20,150,100);if (ctx.isPointInPath(20,50)) { ctx.stroke(); };尝试一下 »浏览...

https://www.w3cschool.cn/htmltags/canvas-ispointinpath.html

685.HTML canvas scale() 方法

HTML canvas scale() 方法 HTML canvas 参考手册实例绘制矩形,放大到 200%,然后再次绘制矩形:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.strokeRect(5,5,25,15);ctx.scale(2,2);ctx.strokeRect(5,5,25,15);尝试一下 »浏览器支持Internet Explorer ...

https://www.w3cschool.cn/htmltags/canvas-scale.html

686.HTML canvas rotate() 方法

HTML canvas rotate() 方法 HTML canvas 参考手册实例将矩形旋转 20 度:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.rotate(20*Math.PI/180);ctx.fillRect(50,20,100,50);尝试一下 »浏览器支持Internet Explorer 9、Firefox、Opera、Chrome 和 Safari 支持...

https://www.w3cschool.cn/htmltags/canvas-rotate.html

687.HTML canvas translate() 方法

HTML canvas translate() 方法 HTML canvas 参考手册 实例 在位置 (10,10) 处绘制一个矩形,将新的 (0,0) 位置设置为 (70,70)。再次绘制新的矩形(请注意现在矩形从位置 (80,80) 开始绘制): JavaScript: var c=document.getElementById("myCanvas"); var ctx=c....

https://www.w3cschool.cn/htmltags/canvas-translate.html

688.HTML canvas setTransform() 方法

HTML canvas setTransform() 方法 HTML canvas 参考手册实例绘制一个矩形,通过 setTransform() 重置并创建新的变换矩阵,再次绘制矩形,重置并创建新的变换矩阵,然后再次绘制矩形。请注意,每当您调用 setTransform() 时,它都会重置前一个...

https://www.w3cschool.cn/htmltags/canvas-settransform.html

689.HTML canvas font 属性

HTML canvas font 属性 HTML canvas 参考手册 实例 在画布上写一段 30 像素的文本,使用的字体是 "Arial":JavaScript: var c=document.getElementById("myCanvas");var ctx=c.getContext("2d"); ctx.font="30px Arial";ctx.fillText("Hello World",10,50); 尝试一下 » 浏览器支...

https://www.w3cschool.cn/htmltags/canvas-font.html

690.HTML canvas stroke() 方法

HTML canvas stroke() 方法 HTML canvas 参考手册实例绘制一条路径,形状是红色的字母 L:var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.beginPath();ctx.moveTo(20,20);ctx.lineTo(20,100);ctx.lineTo(70,100);ctx.strokeStyle="red";ctx.stroke();尝试一下 »...

https://www.w3cschool.cn/htmltags/canvas-stroke.html

抱歉,暂时没有相关的文章

w3cschool 建议您:

  • 检查输入的文字是否有误

热门课程