问答详情
源自:3-1 Canvas 时钟外边框圆

convas标签问题

为什么Canvas在我这里显示不了

提问者:T_Ever 2017-12-13 20:02

个回答

  • qq_杀意隆_0
    2017-12-14 10:14:16
    已采纳

    代码贴出来


  • T_Ever
    2018-01-11 12:23:17

    嘻嘻,谢谢

  • 91_0002
    2018-01-10 16:51:27

    亲爱的   canvas   不是从convas   单词拼错了伤不起

  • T_Ever
    2017-12-18 21:21:07

    是什么原因吗

    还是我代码写错了

  • T_Ever
    2017-12-18 19:51:31

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <style type="text/css">
    div{text-align:center;
         margin-top:250px;}
    #clock{border:1px solid #ccc;}
    </style>
    </head>

    <body>
    <div>
       <convas id="clock" height="200px" width="200px"></convas>
      </div>
     
    </div>
    </body>
    </html>




    效果图:是一竖横

  • qq_杀意隆_0
    2017-12-15 08:45:48

    你提问时的详细问题编辑框左上角有'代码语言',比如选择html或JavaScript. 。像这样:


    http://img3.mukewang.com/5a331a880001dc4209860351.jpg

    <canvas id='canvas' width='1000' height='500'></canvas>
    var canvas = document.getElementById('canvas');
    var ctx = canvas.getContext('2d');

    这样的代码就具有易读性