感谢您的支持,我会继续努力的!
打开微信扫一扫,即可进行扫码打赏哦
点我查看本站打赏源码!
Powered by RUNCODEX.COM,学的不仅是技术,更是梦想!!!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>文档标题</title>
</head>
<body>
<h1>我的第一个HTML页面</h1>
<p>我的第一个段落。</p>
<canvas id='mypad' width ="500" height="500">A drawing of something</canvas>
</body>
</html>
xxxxxxxxxx
var drawing = document.getElementById('mypad');
if(drawing.getContext){
var context= drawing.getContext('2d');
context.fillStyle="rgba(0,0,255,0.5)";
context.fillRect(10,10,50,50);
context.strokeStyle='red';
context.strokeRect(20,20,50,50);
context.clearRect(30,30,20,20);
context.beginPath();
context.arc(200,100,99,0,2*Math.PI,false);
context.moveTo(294,100);
context.arc(200,100,94,0,2*Math.PI,false);
context.moveTo(200,100);
context.lineTo(200,15);
context.moveTo(200,100)
context.lineTo(135,100);
context.stroke();
}
输入 CSS 代码……