html海绵宝宝网页源代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>canvas海绵宝宝</title>
</head>
<body>
<canvas id="canvas"width="1000"height="700"></canvas>
</body>
<script>
var ElementById("canvas");
var Context("2d");
with(ctx){
//袖子
//左
beginPath();
fillStyle="#fff";
strokeStyle="#000";
lineWidth=2;
bezierCurveTo(142,253,112,263,112,303)
quadraticCurveTo(120,308,150,303)
fill();
stroke();
closePath();
//右
beginPath();
fillStyle="#fff";
strokeStyle="#000";
lineWidth=2;
bezierCurveTo(445,253,477,263,477,303)
quadraticCurveTo(467,308,447,303)
fill();
stroke();
closePath();
//胳膊
//左
beginPath();
fillStyle="#f5e261";
strokeStyle="#000";
lineWidth=2;
moveTo(122,306);
lineTo(110,406);
lineTo(120,406);
lineTo(132,306);
fill();
stroke();
closePath();
//右
beginPath();
fillStyle="#f5e261";
strokeStyle="#000";
moveTo(458,306);
lineTo(470,406);
lineTo(480,406);
lineTo(468,306);
fill();
html导航源码stroke();
closePath();
//手
//左
//衣服
beginPath();
fillStyle="#fff";
strokeStyle="#000";
lineWidth=5;
shadowColor="#000";
shadowOffsetX=0;
shadowOffsetY=0;
shadowBlur=0;
moveTo(145,385);
lineTo(146,425);
lineTo(442,425);
lineTo(443,385);
stroke();
fill();
closePath();
//裤子
beginPath();
fillStyle="#ae6f28";
strokeStyle="#000";
moveTo(146,427);
lineTo(147,470);
lineTo(441,470);
lineTo(442,427);
stroke();
fill();
closePath();
//裤子图案
beginPath();
fillStyle="#000";
rect(156,438,60,15);
rect(236,438,120,15);
rect(373,438,60,15);
fill();
closePath();
//裤腿
beginPath();
fillStyle="#ae6f28";
strokeStyle="#000";
lineWidth=2;
moveTo(190,472);
lineTo(190,490);
lineTo(235,490);
lineTo(235,472);
moveTo(350,472);
lineTo(350,490);
lineTo(395,490);
lineTo(395,472);
fill();

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。