欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

HTML5 canvas strokeRect() 方法

實例

繪制 150*100 像素的矩形:

Your browser does not support the HTML5 canvas tag.

JavaScript:

var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.strokeRect(20,20,150,100);

親自試一試

瀏覽器支持

Internet Explorer 9、Firefox、Opera、Chrome 以及 Safari 支持 strokeRect() 方法。

注釋:Internet Explorer 8 或更早的瀏覽器不支持 <canvas> 元素。

定義和用法

strokeRect() 方法繪制矩形(不填色)。筆觸的默認(rèn)顏色是黑色。

提示:請使用 strokeStyle 屬性來設(shè)置筆觸的顏色、漸變或模式。

JavaScript 語法:

context.strokeRect(x,y,width,height);

參數(shù)值

參數(shù) 描述
x 矩形左上角的 x 坐標(biāo)
y 矩形左上角的 y 坐標(biāo)
width 矩形的寬度,以像素計
height 矩形的高度,以像素計