目前共有2篇帖子。
字体大小:较小 - 100% (默认)  内容转换:不转换
 
点击 回复
1129 1
Vista的IE9支持canvas画布
巨大八爪鱼
武林盟主 二十一级
回复
1楼 发表于:2024-5-23 20:40
巨大八爪鱼
武林盟主 二十一级
回复
2楼 发表于:2024-5-23 20:40
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Test canvas</title>
<script>
function drawPicture() {
    var canvas = document.querySelector("#myCanvas");
    var ctx = canvas.getContext("2d");
    ctx.fillStyle = "#FFCCDD";
    ctx.fillRect(0, 0, 200, 100);

    ctx.beginPath();
    ctx.arc(95, 50, 40, 0, 2 * Math.PI);
    ctx.stroke();

    ctx.font = "30px Arial";
    ctx.fillStyle = "cyan";
    ctx.fillText("Hello World", 10, 50);
}
</script>
</head>

<body onload="drawPicture()">
<canvas id="myCanvas" width="200" height="100" style="border: 1px solid black"></canvas>
</body>
</html>
回复帖子
内容:
用户名: 您目前是匿名发表。
验证码:
看不清?换一张
(快捷键:Ctrl+Enter)
本帖信息
点击数:1129 回复数:1
作者:巨大八爪鱼
最后回复:巨大八爪鱼
最后回复时间:2024-5-23 20:40
公告板