这样对不对

来源:4-5 编程练习

Victor19950925

2019-06-20 17:06:46

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>canvasL</title>
    <style>
        canvas{background-color:lightblue;}
    </style>
</head>
<body>
    <canvas id="canvas" width="600px" height="600px">您的浏览器不支持</canvas>
    <script>
      // 在此处写出代码
      canvas=document.getElementById("canvas")
      ctx=canvas.getContext("2d")
      ctx.translate(100,200)
      ctx.rotate(Math.PI/3)
      ctx.scale(0.5,0.5)
      ctx.fillStle="yellow"
      ctx.fillRect(100,100,200,300)
      
    </script>
</body>
</html>


写回答

1回答

好帮手慕码

2019-06-20

同学你好,fillStyle单词写错了,建议修改:

http://img.mukewang.com/climg/5f4c61240963c61d02390042.jpg

如果帮助到了你 欢迎采纳 祝学习愉快~

0

0 学习 · 6815 问题

查看课程